mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-24 23:09:16 +01:00
colors: Add light theme support.
This commit is contained in:
parent
69604342a1
commit
929c0ee5b0
@ -68,18 +68,6 @@ def create_palette(img, colors, light):
|
|||||||
raw_colors[15] = raw_colors[7]
|
raw_colors[15] = raw_colors[7]
|
||||||
raw_colors[8] = util.lighten_color(raw_colors[7], 0.25)
|
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:
|
else:
|
||||||
# Darken the background color slightly.
|
# Darken the background color slightly.
|
||||||
if raw_colors[0][1] != "0":
|
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[8] = util.darken_color(raw_colors[7], 0.30)
|
||||||
raw_colors[15] = util.blend_color(raw_colors[15], "#EEEEEE")
|
raw_colors[15] = util.blend_color(raw_colors[15], "#EEEEEE")
|
||||||
|
|
||||||
colors = {"wallpaper": img, "alpha": util.Color.alpha_num,
|
colors = {"wallpaper": img, "alpha": util.Color.alpha_num,
|
||||||
"special": {}, "colors": {}}
|
"special": {}, "colors": {}}
|
||||||
colors["special"]["background"] = raw_colors[0]
|
colors["special"]["background"] = raw_colors[0]
|
||||||
colors["special"]["foreground"] = raw_colors[15]
|
colors["special"]["foreground"] = raw_colors[15]
|
||||||
colors["special"]["cursor"] = 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):
|
for i, color in enumerate(raw_colors):
|
||||||
colors["colors"]["color%s" % i] = color
|
colors["colors"]["color%s" % i] = color
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user