diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-06-29 18:52:44 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-06-29 18:52:44 +1000 |
| commit | 1541af9052d9c12fb3d23832838fce69fcc02761 (patch) | |
| tree | f6d6562d3c5647e7cdcd70dccd262b3135cb09b2 | |
| parent | e92bce4fe932ea9e13abb6c01a9685bb3bada73b (diff) | |
colors: Convert colors to rgb for putty.
| -rwxr-xr-x | pywal/export_colors.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pywal/export_colors.py b/pywal/export_colors.py index 9a3d958..90b3b8f 100755 --- a/pywal/export_colors.py +++ b/pywal/export_colors.py @@ -28,9 +28,21 @@ def template(colors, input_file): def export_all_templates(colors): """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. 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 [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") |
