Issue #102: add preliminary variable processing.

This commit is contained in:
Sergey Vartanov 2022-01-08 23:29:45 +03:00
parent dc54c47916
commit d2e205fcaf

View file

@ -395,7 +395,15 @@ class Scheme:
return Color(color)
except (ValueError, AttributeError):
logging.debug(f"Unknown color `{color}`.")
return DEFAULT_COLOR
return Color(self.colors["default"])
def get(self, variable_name: str):
"""
FIXME: colors should be variables.
"""
if variable_name in self.colors:
return self.colors[variable_name]
return 0.0
def is_no_drawable(self, key: str, value: str) -> bool:
"""