- From: Tom Churchman via GitHub <sysbot+gh@w3.org>
- Date: Tue, 21 Jan 2025 11:28:52 +0000
- To: public-css-archive@w3.org
tomcur has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-color-4] parsed-value-time lightness clamping == The specification of parsed-value-time lightness clamping differs for different color spaces. Section 7 says to clamp saturation for HSL, but not lightness. Sections 9.3 and 9.4 say to clamp lightness for Lab/Lch and Oklab/Oklch respectively. I did a little bit of digging. 1. HSL's lightness used to be clamped, but it became unbounded in https://github.com/w3c/csswg-drafts/commit/44c37787dfeeb299bad9be0f2dd7290f0f76bb53, discussion at https://github.com/w3c/csswg-drafts/issues/8444. 3. Lab/Oklab used to be unbounded, but became clamped in https://github.com/w3c/csswg-drafts/commit/d504654964b10634c9f77dc53b864add4074f530 with "powerless" color components at 100% lightness, discussion at https://github.com/w3c/csswg-drafts/issues/7924. 4. The incorrect "powerless" statement was dropped in https://github.com/w3c/csswg-drafts/commit/96be9333a3b9b63f84d480b1f2df948975ee3ee6, discussion at https://github.com/w3c/csswg-drafts/issues/8609. The reason HSL became unbounded appears to be its ability to round trip fine with the RGB models. In theory, though perhaps not recommendable, specifying lightness above 100% is more or less fine for these perceptual models and the math round trips with the RGB models. As far as I understand it, 100% lightness in general (and white point in specific) of these color spaces is not a pole but a smooth point; though I believe these color spaces do start to lose their predictive power when outside of their "natural gamuts". If lightness is at or above 100%, it is the choice to preserve lightness over chroma during gamut mapping to, e.g., sRGB, that maps these colors to white. A different choice of gamut mapping technique could map to a chromatic color, and that color could change with further increasing lightness. On an HDR display the color may be in gamut. The current wording prevents specifying colors brighter than media white, whereas those can currently be specified in HSL, XYZ, and the various RGB models. Would it make sense to drop the required parsed-value time clamping of lightness for the perceptual models Lab/Lch/Oklab/Oklch? Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11549 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 21 January 2025 11:28:52 UTC