-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"rgb-float" format should probable return linear "sRGB" values to be useful. #85
Comments
Interestingly (colour-3.7) Kali:debug kelsolaar$ ./pastel format luminance "#808080"
0.216 It makes me wonder if instead of having a new |
Thank you for the feedback. The current "rgb-float" format is simply the RGB values, divided by 255. In your example, 0x80 = 128 and 128/255 is approximately 0.502. Luminance, on the other hand, is computed in Lab space. If you could point me to some sources where I can read up on the differences between "linear"/scene-referred RGB, I'm happy to take a look. |
Yes I saw!
It is actually more the fact that you are decoding the non-linearly encoded values with sRGB EOTF here: Line 553 in 4305363
Which is what I think the suggested A bit of reading on Motion Pictures Colour Management: https://cinematiccolor.org/ Definition of Scene-Referred (Image State) as per ISO 22028-1:
and definition of Output-Referred (Image State) also as per ISO 22028-1:
The former represents linear light values in the scene, i.e. the real world colour values that can be measured with a light meter, given in relative or absolute terms. The latter represents non-linear light values that have been encoded, e.g. with sRGB inverse EOTF, to be displayed on a device. Rendering and lighting-related computations are performed in a linear colourspace, i.e. a scene-referred colourspace, and values we input to those systems are of course most of the time linear. For example, in the VFX industry, we traditionally use the 18% reflectance gray card as our perceptual middle gray. Its value is obviously 0.18 in Scene-Referred RGB and Hope it makes sense :) PS: Note how the non-linearly encoded sRGB value of 128 is close to 18%, i.e. 0.216, when decoded to Scene-Referred RGB. |
Hi,
I was testing pastel a bit, very nice tool! I noticed that the values returned by the
rgb-float
format are non-linearly encoded, i.e. they have the sRGB inverse EOTF applied, which limit their usefulness:Often, when people are working with floating-point colours, they need to use linear, i.e. scene-referred RGB, colours to drive a shader for example. I would thus suggest adding a new format, e.g.
rgb-linear
, that would yield linear colours.Cheers,
Thomas
The text was updated successfully, but these errors were encountered: