When choosing e.g. pure red (255,0,0) the color chooser shows a luminance L=54.3 with respect to the interval 0…100. This corresponds to a luminance/lightness of over 50%. According to the formula for luminance I calculate a value of approx. L=22 for pure red. What do I miss here or is this a bug?
Actually I can see a luminance of over 50% for pure red in any operation involving the LCh model, e.g. desaturation filters or LCh blending modes. In my view this is far too bright for the rather dark appearance of pure red.
In the range of 0…255 a value for luminance of L=54.3 for pure red makes sence,but not in the range of 0…100.
A few days ago I posted a bug report about this issue on gitlab.gnome.org, but so far there was no answer. I am not an expert in color space science, probably I am confusing something here.
The versions of gimp that I tested were 2.10.18 and the latest 2.10.30.
Thanks to the developers for such a wonderful program!
In the range of 0…255 a value for luminance of L=54.3 for pure red makes sence,but not in the range of 0…100.
I believe that you have been overthinking this
0…255, and 0…100 indicates RGB notation only, it is just two ways of writing the same thing. The 0…100 is nothing but a percentage of 255 (and has nothing to do with L).
Select 0…100, and enter 10 in each of the R, G, and B fields. L becomes 9.0, right?
Without changing the R, G, and B entries, select 0…255. The R, G, and B entires will each be transformed into 25.5, but the L value is still 9.0.
From the Gimp documentation it says:
The shades of gray will be calculated using linearized sRGB as
Luminance = (0.22 × R) + (0.72 × G) + (0.06 × B).
So when I choose e.g. pure red in the range 0…100 (R=100, G=0, B=0) I end up with a luminance of L=22 (and not L=54.3).
Yes, you are right, I am aware that using either RGB ranges 0…100 or 0…255 won’t change the actual color. But the point is, when I desaturate the value L=54.3 seems to be too high for pure red (R=100, G=0, B=0). It is not only visible in the numerical values. In my opinion, you can see that a desaturated red by luminance/lightness gives a gray that is too bright. This effects also a desaturation by blending modes. So I think it is not a matter of choosing ranges 0…100 or 0…255 but a matter of the calculation of the actual gray values.
thank you for the very interesting link.
I agree, yes, that would yield L=56 (when you use some floating point representations for the R-factor, e.g. 0.21xxx something, then you end up with L=54.3). But L=56 would mean a L-value also in the interval 0…255, which is far less than 50%. For pure red, I would expect this:
R=100, G=0, B=0 <-> L=22 (both in range 0…100)
R=255, G=0, B=0 <-> L=56 (both in range 0…255).
But Gimp gives me: L=56 in range 0…100. I feel that this is too bright for pure red, since it is more than 50% gray.
L* in L*C*h° is lightness not luminance. If we are talking about G’MIC, the conversion goes as follows:
gmic 500,500,1,3,[255,0,0] srgb2rgb rgb2lab
On my request a while back, rgb2lab takes in a parameter defining the illuminant (D50 → L*=54.29, D65 → L*=53.2408, E → L*=49.0325), which varies the values a bit. Also the srgb2rgb could vary depending on your interpretation of the conversion.
PS Oops, I forgot to mention the most important thing. L*a*b* is a perceptual space! L*C*h° is just the polar transform of it (the C*h° part).
Hi afre and thank you!
Yes, good remark that luminance and lightness are different measures. So, do I understand correctly that gmic is responsible for the conversions leading to the values in the color picker docker? Very interesting, thanks for pointing me to gmic.
Let me ask, the values you listed, e.g. (D50 → L*=54.29, D65 → L*=53.2408, E → L*=49.0325), what is the maximum value for L*, is it L*_max=100 or L*_max=255?
GIMP and G’MIC are separate apps but the latter can be a plugin for the former. It was mentioned above, so I used it as an example. For more information on the math, see: Welcome to Bruce Lindbloom's Web Site. Unfortunately, the site is old and not https (and there is one transform issue). Click on the Math link.
The range for L* is usually 0-100 and less commonly 0-1. Rarely, none of the channels are normalized, so other values may show. One thing that people don’t realize is that max values are not as important as the relationship among the channels. What I mean is that if you set something to max, very often that is not a real colour. Colour spaces are just models attempting to explain the real world. I believe GIMP has an out-of-gamut indicator in the palette tool to warn users.