mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-05-20 16:20:53 +02:00
colors: Fix bug with brighter backgrounds
This commit is contained in:
parent
4ceda6bbbc
commit
d9f523a85e
@ -56,7 +56,9 @@ def sort_colors(img, colors):
|
|||||||
raw_colors = colors[:1] + colors[9:] + colors[8:]
|
raw_colors = colors[:1] + colors[9:] + colors[8:]
|
||||||
|
|
||||||
# Darken the background color if it's too light.
|
# Darken the background color if it's too light.
|
||||||
if int(raw_colors[0][1]) >= 3:
|
# The value can be a letter or an int so we treat the
|
||||||
|
# entire test as strings.
|
||||||
|
if raw_colors[0][1] not in ["0", "1", "2"]:
|
||||||
raw_colors[0] = util.darken_color(raw_colors[0], 0.25)
|
raw_colors[0] = util.darken_color(raw_colors[0], 0.25)
|
||||||
|
|
||||||
colors = {"wallpaper": img}
|
colors = {"wallpaper": img}
|
||||||
|
Loading…
Reference in New Issue
Block a user