mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-20 09:37:42 +02:00
set alpha_num in class Color from data
This commit is contained in:
parent
7fae8d23f5
commit
3d3b6a4d45
@ -77,6 +77,7 @@ def flatten_colors(colors):
|
|||||||
"alpha": colors["alpha"],
|
"alpha": colors["alpha"],
|
||||||
**colors["special"],
|
**colors["special"],
|
||||||
**colors["colors"]}
|
**colors["colors"]}
|
||||||
|
util.Color.alpha_num = all_colors["alpha"]
|
||||||
return {k: util.Color(v) for k, v in all_colors.items()}
|
return {k: util.Color(v) for k, v in all_colors.items()}
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ def parse(theme_file):
|
|||||||
data["wallpaper"] = "None"
|
data["wallpaper"] = "None"
|
||||||
|
|
||||||
if "alpha" not in data:
|
if "alpha" not in data:
|
||||||
data["alpha"] = util.Color.alpha_num
|
data["alpha"] = "100"
|
||||||
|
|
||||||
# Terminal.sexy format.
|
# Terminal.sexy format.
|
||||||
if "color" in data:
|
if "color" in data:
|
||||||
|
@ -14,7 +14,6 @@ import sys
|
|||||||
|
|
||||||
class Color:
|
class Color:
|
||||||
"""Color formats."""
|
"""Color formats."""
|
||||||
alpha_num = "100"
|
|
||||||
|
|
||||||
def __init__(self, hex_color):
|
def __init__(self, hex_color):
|
||||||
self.hex_color = hex_color
|
self.hex_color = hex_color
|
||||||
|
Loading…
x
Reference in New Issue
Block a user