mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fix hue shifting brightening and darkening on colors between yellow and purple
By yellow and purple I mean hue 60 and hue 270 respectively
This commit is contained in:
parent
e7f8417d0d
commit
58b1da41a1
|
@ -90,7 +90,7 @@ class LightenDarkenOp extends Drawer.ColorOp:
|
||||||
|
|
||||||
# Colors between yellow-purple
|
# Colors between yellow-purple
|
||||||
elif hue_shift < 0 and hue + hue_shift <= hue_lighten_limit:
|
elif hue_shift < 0 and hue + hue_shift <= hue_lighten_limit:
|
||||||
hue_shift = 0
|
hue_shift = clamp(hue_shift, -(hue - hue_lighten_limit), 0)
|
||||||
return hue_shift
|
return hue_shift
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,8 +103,8 @@ class LightenDarkenOp extends Drawer.ColorOp:
|
||||||
hue_shift = 0
|
hue_shift = 0
|
||||||
|
|
||||||
# Colors between yellow-purple
|
# Colors between yellow-purple
|
||||||
elif hue_shift < 0 and hue + hue_shift <= hue_darken_limit:
|
elif hue_shift < 0 and hue - hue_shift >= hue_darken_limit:
|
||||||
hue_shift = 0
|
hue_shift = clamp(hue_shift, -(hue_darken_limit - hue), 0)
|
||||||
return hue_shift
|
return hue_shift
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue