From 3d3b6a4d456276332c09bd3c25060ec77f3da4b6 Mon Sep 17 00:00:00 2001 From: fc-anjos Date: Wed, 10 Jun 2020 22:58:37 -0300 Subject: [PATCH 1/2] set alpha_num in class Color from data --- pywal/export.py | 1 + pywal/theme.py | 2 +- pywal/util.py | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pywal/export.py b/pywal/export.py index 8f581b9..ccc9be3 100644 --- a/pywal/export.py +++ b/pywal/export.py @@ -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()} diff --git a/pywal/theme.py b/pywal/theme.py index 9dc4f13..0aa66b6 100644 --- a/pywal/theme.py +++ b/pywal/theme.py @@ -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: diff --git a/pywal/util.py b/pywal/util.py index 1fdae31..1f8eeb3 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -14,7 +14,6 @@ import sys class Color: """Color formats.""" - alpha_num = "100" def __init__(self, hex_color): self.hex_color = hex_color From 3f4622c923f63e66d4a473884d0a0095943daf0d Mon Sep 17 00:00:00 2001 From: fc-anjos Date: Wed, 10 Jun 2020 23:28:44 -0300 Subject: [PATCH 2/2] keep alpha in util.Colors --- pywal/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pywal/util.py b/pywal/util.py index 1f8eeb3..1fdae31 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -14,6 +14,7 @@ import sys class Color: """Color formats.""" + alpha_num = "100" def __init__(self, hex_color): self.hex_color = hex_color