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

The slides shared by @ccameron-chromium contained a few assertions I was curious to test, so I wrote a [script](https://github.com/jamesnw/color-gma-test) to iterate through many colors, with [results here](https://github.com/jamesnw/color-gma-test/blob/main/results.json).

```
Clipping P3 to sRGB produces extremely high quality results, and almost no existing displays are >>P3.
```
For colors in p3 and out of sRGB, clip retains chroma better on average, but chroma reduction retains lightness and hue better on average. Chroma reduction has a slightly better DeltaE2000, but it's very close. Overall, the differences aren't large, partly because the magnitude of the change is not large. Clipping P3 to sRGB produces acceptable results, in my mind.

```
Clipping Rec2020 to sRGB is unknown quality.
Evidence suggests that clipping produces good quality here.
Evidence suggests that CSS gamut mapping produces poor quality.
```

I'm seeing the same thing as with p3 > sRGB here- clipping retains chroma slightly better, but has much higher shifts to lightness and hue. Chroma reduction again has a slightly better DeltaE2000. I'm not seeing evidence here to point to clipping outperforming chroma reduction.

I'd welcome thoughts on additional metrics to compare, and additional eyes on the [results](https://github.com/jamesnw/color-gma-test/blob/main/results.json). Looking at the full results, it seems that @ccameron-chromium's point that clipping works well when you're close to the destination gamut holds true.  However, the further you need to map, the more of a shift clipping gives, especially in lightness and hue. If you look just at the colors that are outside of rec2020 (which I mapped to p3), chroma reduction almost matches clipping for maintaining chroma, but vastly outperforms clipping for lightness and hue.

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


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

Received on Thursday, 28 March 2024 15:31:21 UTC