From 58b1da41a1794ce19596846b38be6fc97e15b9ef Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 18 Aug 2021 21:53:42 +0300 Subject: [PATCH] Fix hue shifting brightening and darkening on colors between yellow and purple By yellow and purple I mean hue 60 and hue 270 respectively --- src/Tools/Shading.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tools/Shading.gd b/src/Tools/Shading.gd index f14e8d0d6..8d91aa2f1 100644 --- a/src/Tools/Shading.gd +++ b/src/Tools/Shading.gd @@ -90,7 +90,7 @@ class LightenDarkenOp extends Drawer.ColorOp: # Colors between yellow-purple 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 @@ -103,8 +103,8 @@ class LightenDarkenOp extends Drawer.ColorOp: hue_shift = 0 # Colors between yellow-purple - elif hue_shift < 0 and hue + hue_shift <= hue_darken_limit: - hue_shift = 0 + elif hue_shift < 0 and hue - hue_shift >= hue_darken_limit: + hue_shift = clamp(hue_shift, -(hue_darken_limit - hue), 0) return hue_shift