diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2018-02-02 19:41:39 +1100 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2018-02-02 19:41:39 +1100 |
| commit | 929c0ee5b0762ba13730fd75dfe6baaef4b67f09 (patch) | |
| tree | 1b867c9b412501620b4f3321d79014a233a79504 /pywal | |
| parent | 69604342a15066b3c7db09b0d2618fe415b871c0 (diff) | |
colors: Add light theme support.
Diffstat (limited to 'pywal')
| -rw-r--r-- | pywal/colors.py | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/pywal/colors.py b/pywal/colors.py index 5ed0e62..718d540 100644 --- a/pywal/colors.py +++ b/pywal/colors.py @@ -68,18 +68,6 @@ def create_palette(img, colors, light): raw_colors[15] = raw_colors[7] raw_colors[8] = util.lighten_color(raw_colors[7], 0.25) - colors = {"wallpaper": img, "alpha": util.Color.alpha_num, - "special": {}, "colors": {}} - colors["special"]["background"] = raw_colors[0] - colors["special"]["foreground"] = raw_colors[15] - colors["special"]["cursor"] = raw_colors[15] - - for i, color in enumerate(raw_colors): - color = util.darken_color(color, 0.30) - colors["colors"]["color%s" % i] = util.saturate_color(color, 50) - - colors["colors"]["color0"] = raw_colors[0] - else: # Darken the background color slightly. if raw_colors[0][1] != "0": @@ -90,12 +78,20 @@ def create_palette(img, colors, light): raw_colors[8] = util.darken_color(raw_colors[7], 0.30) raw_colors[15] = util.blend_color(raw_colors[15], "#EEEEEE") - colors = {"wallpaper": img, "alpha": util.Color.alpha_num, - "special": {}, "colors": {}} - colors["special"]["background"] = raw_colors[0] - colors["special"]["foreground"] = raw_colors[15] - colors["special"]["cursor"] = raw_colors[15] + colors = {"wallpaper": img, "alpha": util.Color.alpha_num, + "special": {}, "colors": {}} + colors["special"]["background"] = raw_colors[0] + colors["special"]["foreground"] = raw_colors[15] + colors["special"]["cursor"] = raw_colors[15] + if light: + for i, color in enumerate(raw_colors): + color = util.darken_color(color, 0.30) + colors["colors"]["color%s" % i] = util.saturate_color(color, 50) + + colors["colors"]["color0"] = raw_colors[0] + + else: for i, color in enumerate(raw_colors): colors["colors"]["color%s" % i] = color |
