Re: [csswg-drafts] [css-color-4] Are a and b in lab( 0%, a, b ) really powerless? [css-color-4] (#6758)

That will, as you say, depend on the gamut mapping algorithm. Unfortunately the three converters you linked to don't state how they map out of gamut colors. They may simply be clamping out of range components.

[Using color.js](https://colorjs.io/apps/convert/?color=lab(%200%25%2C%20-100%2C%20100%20)&precision=6), which uses constant-hue constant-lightness reduction in LCH Chroma, I get the oog color color(srgb -0.2519 0.16198 -0.306) which gamut maps to rgb(0% 0.465% 0%) which is very nearly, but not quote, pure black. The deltaE200 is 0.75, so it is visually indistinguishable from pure black.

The gamut mapping section is indeed still to be written but we have resolved

1. To do Chroma reduction in OKLCH
2. To use the powerless concept.

Taking those one at a time: lab(0% -100 100) in OKLCH is oklch(-17.24% 0.29655 146.962) which is indeed oog as color(srgb -0.2519 0.16197 -0.306). Interesting that we get a negative OKLCH Lightness!

With the powerless concept, on color conversion powerless components become missing which means they are treated as 0, so we are converting lab(0% 0 0) which is pure black, and is oklch(0 0 0) to six significant figures.

You mention ICC profiles and the most likely reason an implementation would use them is to convert to CMYK (or CMYKOGV). In that case, lab(0% -100 100) would map to a lighter color than black, but so would lab(0% 0 0) simply because ink-based spaces cannot produce an infinite density black.

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6758#issuecomment-950200560 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 23 October 2021 19:20:53 UTC