Skip to content

Commit

Permalink
improve color lightness and saturation
Browse files Browse the repository at this point in the history
in 9 colors mode, the color 8 is a bit lighter and more saturated.

in 16 colors mode, the colors 7 and 8 are a bit lighter and more saturated.
  • Loading branch information
eylles committed Jul 5, 2024
1 parent 2d3cde6 commit e111cac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pywal/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ def generic_adjust(colors, light, cols16):
if colors[0][1] != "0": # the color may already be dark enough
colors[0] = util.darken_color(colors[0], 0.40) # just a bit darker
if cols16:
colors[7] = util.lighten_color(colors[0], 0.50)
colors[8] = util.lighten_color(colors[0], 0.25)
colors[7] = util.lighten_color(colors[0], 0.55)
colors[7] = util.saturate_color(colors[7], 0.05)
colors[8] = util.lighten_color(colors[0], 0.35)
colors[8] = util.saturate_color(colors[8], 0.10)
colors[15] = util.lighten_color(colors[0], 0.75)
if cols16 == "lighten":
colors[9] = util.lighten_color(colors[1], 0.25)
Expand All @@ -123,7 +125,8 @@ def generic_adjust(colors, light, cols16):

else:
colors[7] = util.lighten_color(colors[0], 0.75)
colors[8] = util.lighten_color(colors[0], 0.25)
colors[8] = util.lighten_color(colors[0], 0.35)
colors[8] = util.saturate_color(colors[8], 0.10)
colors[15] = colors[7]

return colors
Expand Down

0 comments on commit e111cac

Please sign in to comment.