set alpha_num in class Color from data

This commit is contained in:
fc-anjos 2020-06-10 22:58:37 -03:00
parent 7fae8d23f5
commit 3d3b6a4d45
3 changed files with 2 additions and 2 deletions

View File

@ -77,6 +77,7 @@ def flatten_colors(colors):
"alpha": colors["alpha"],
**colors["special"],
**colors["colors"]}
util.Color.alpha_num = all_colors["alpha"]
return {k: util.Color(v) for k, v in all_colors.items()}

View File

@ -82,7 +82,7 @@ def parse(theme_file):
data["wallpaper"] = "None"
if "alpha" not in data:
data["alpha"] = util.Color.alpha_num
data["alpha"] = "100"
# Terminal.sexy format.
if "color" in data:

View File

@ -14,7 +14,6 @@ import sys
class Color:
"""Color formats."""
alpha_num = "100"
def __init__(self, hex_color):
self.hex_color = hex_color