Skip to content
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

Powerless a,b and chroma for Lightness >= 100% #7924

Closed
Tracked by #3497
svgeesus opened this issue Oct 19, 2022 · 3 comments
Closed
Tracked by #3497

Powerless a,b and chroma for Lightness >= 100% #7924

svgeesus opened this issue Oct 19, 2022 · 3 comments
Labels
css-color-4 Current Work

Comments

@svgeesus
Copy link
Contributor

svgeesus commented Oct 19, 2022

In a somewhat handwavy piece of spec text that was intended to provide an escape hatch for HDR, we have, for CIE Lab

If the lightness of a Lab color is 0%, both the a and b components are powerless.

and for Oklab

If the lightness of an Oklab color is 0%, both the a and b components are powerless.

In the midst of a long discussion about powerless components, none and NaN, @tabatkins wrote:

Just black and white. Those colors are singularities for chroma (all chroma values return the same color), while the rest of the neutral axis does have the color change as chroma changes.

I'm wondering it it would be better to also say (as @tabatkins seems to be suggesting, in that older thread) that

a) Lightness of 100% clamps to 100%
b) If the lightness of a Lab color is 100%, both the a and b components are powerless.

Oklab was defined by the author to be specifically SDR; and although Lab has been experimentally extended by Fairchild to L=400, he gave that a different name (hdr-CIELAB) and it didn't really catch on. In practice, HDR colors are likely to be specified in rec-2100-hlg or rec-2100-pq.

@svgeesus svgeesus added the css-color-4 Current Work label Oct 19, 2022
@tabatkins
Copy link
Member

Yeah, the L=400 thing is the only reason I didn't immediately just say that L=100 meant powerless, as I wasn't sure if the components were supposed to be able to alter the color above that level. If Lab is meant to clamp to 100, then we should do that explicitly, and say chroma is powerless there.

@svgeesus
Copy link
Contributor Author

Sometimes wiggle room allows later extension, and sometimes it just provides pointless slop and WPT failures.

@svgeesus
Copy link
Contributor Author

Crucially, the L axis in hdr-CIELAB uses a modified equation compared to CIE Lab:

image

It isn't just "extending the range to 400".

The above is equation 23 from

M.D. Fairchild and P.-H. Chen, "Brightness, lightness, and specifying color in high-dynamic-range scenes and images," SPIE/IS&T Electronic Imaging Conference, San Francisco, 78670O-1 -78670O-14 (2011). full text PDF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-color-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants