Closed dsizzle closed 1 year ago
I compared with Krita and except for Color/Luminosity they look correct. (Color and Luminosity are opposites) If I have time I'll try GIMP or another tool. Not sure why the brightness is so different with those two? :confused:
ArtPaint hue:
Krita hue(hsl):
ArtPaint saturation:
Krita saturation(hsl):
ArtPaint luminosity:
Krita luminosity (EDIT: this is the wrong blend, "luminosity" in Krita uses the LCh color model, not HSL):
ArtPaint color:
Krita color (EDIT: this is the wrong blend, "color" in Krita uses the Lch color model so this is actually "Chroma"):
No idea about the differences to GIMP, unsurprisingly. It does do some blending, so it is working correctly, but may need some algo-twiddling...
Ok, I checked and rechecked the math and it's all correct. The problem is a matter of terminology - Lightness, Luminance, and Luminosity are used in different contexts to mean different things. :exploding_head:
So I renamed this to use "Lightness" because it seems to match other tools.
GIMP "Color" blend:
ArtPaint "Color":
Krita "Lightness":
ArtPaint "Lightness":
Krita's "Luminosity" matches GIMP's "Lch Lightness" which uses the LCh color model. The ArtPaint ones in this PR are using the HSL color model (because they're called Hue, Saturation, Lightness and Color).
So this code is correct.
Gfx programming is an occult art that demands the correct incantations, it seems. Merge when ready, I say.
Merged.
-as a side effect, added hsl2rgb and rgb2hsl functions to ColorUtilities.h
Fixes #555