mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-20 09:37:42 +02:00
colors: Convert colors to rgb for putty.
This commit is contained in:
parent
e92bce4fe9
commit
1541af9052
@ -28,9 +28,21 @@ def template(colors, input_file):
|
|||||||
|
|
||||||
def export_all_templates(colors):
|
def export_all_templates(colors):
|
||||||
"""Export all template files."""
|
"""Export all template files."""
|
||||||
|
# Exclude these templates from the loop.
|
||||||
|
# The excluded templates need color
|
||||||
|
# conversion or other intervention.
|
||||||
|
exclude = ["colors-putty.reg"]
|
||||||
|
|
||||||
# Merge both dicts.
|
# Merge both dicts.
|
||||||
colors["colors"].update(colors["special"])
|
colors["colors"].update(colors["special"])
|
||||||
|
|
||||||
|
# Convert colors to other format.
|
||||||
|
colors_rgb = {k: util.hex_to_rgb(v) for k, v in colors["colors"].items()}
|
||||||
|
|
||||||
# pylint: disable=W0106
|
# pylint: disable=W0106
|
||||||
[template(colors["colors"], file.name)
|
[template(colors["colors"], file.name)
|
||||||
for file in os.scandir(TEMPLATE_DIR)]
|
for file in os.scandir(TEMPLATE_DIR)
|
||||||
|
if file not in exclude]
|
||||||
|
|
||||||
|
# Call 'putty' manually since it needs RGB colors.
|
||||||
|
template(colors_rgb, "colors-putty.reg")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user