You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of lighten and darken uses absolute values (like self.lightness + amount), but that gives wildly different results between color spaces and isn't usually desired result. It may be more useful if they changed relative to the extremes, like self.lightness + (1.0 - self.lightness) * amount. The current behavior is on the other hand also useful.
Saturate and desaturate are currently implemented as self.saturation * (1.0 + factor) and self.saturation * (1.0 - factor), but should be changed to have the same behavior as lighten/darken.
I'm thinking it would be nice to give both options, but make the relative mode the "default". So there could be lighten and lighten_absolute or lighten_fixed and so on. The relative modes could be default implemented using the absolute modes.
The text was updated successfully, but these errors were encountered:
The current implementation of lighten and darken uses absolute values (like
self.lightness + amount
), but that gives wildly different results between color spaces and isn't usually desired result. It may be more useful if they changed relative to the extremes, likeself.lightness + (1.0 - self.lightness) * amount
. The current behavior is on the other hand also useful.Saturate and desaturate are currently implemented as
self.saturation * (1.0 + factor)
andself.saturation * (1.0 - factor)
, but should be changed to have the same behavior as lighten/darken.I'm thinking it would be nice to give both options, but make the relative mode the "default". So there could be
lighten
andlighten_absolute
orlighten_fixed
and so on. The relative modes could be default implemented using the absolute modes.The text was updated successfully, but these errors were encountered: