Re: [csswg-drafts] [css-color-4] Channel clipping breaks author expectations, especially when using 'perceptually uniform' spaces (#9449)

> > Clipping is not error handling; it's _attempting_ to show something reasonable, but doing it poorly.
> 
> @ccameron-chromium you have asserted a few times that in your experiments clipping does a reasonable job. Is that just for close-to-in-gamut colors, or are you making a stronger claim? Do you have some evidence you can show to back up this assertion?

It's for "close-to-in-gamut colors". To quantify what I mean by "close":

I believe that there does not exist P3 content that, when mapped to sRGB via clipping, looks "bad" or suffers a decrease in legibility. This is based on visualizing the effects of gamut mapping versus clipping on the gamut directly using [this demo](https://ccameron-chromium.github.io/webgl-examples/gamut.html) and visualizing the effects on whole images using [this demo](https://ccameron-chromium.github.io/webgl-examples/tonemap.html) (that's designed for HDR tone mapping testing, but I bolted on SDR gamut mapping testing).

If someone can create a page that uses P3 colors that the feel gets mauled by clipping to sRGB, then please send a P3 snapshot of it. I've tried as hard as I can and I cannot produce such a thing.

With respect to mapping Rec2020 to sRGB, I have to temper my confidence by the fact that I do not have a Rec2020 display. I suspect (based on the figures from the slides) that the Rec2020 gamut is treated better by clipping than by the CSS gamut mapping algorithm. I alluded to CSS gamut mapping doing some unexpected things to the region around `color(rec2020 0 0 1)`. You can see this in the sharp blue line on the left in [this demo](https://svgees.us/Color/ok-clip-lch-explorer.html) when lightness is set to 0.4 (or so).

This is all to say that requiring any specific kind of gamut mapping from P3 to sRGB (and likely Rec2020 to sRGB) is to over-egg the pudding.

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


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

Received on Wednesday, 27 March 2024 17:49:52 UTC