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

> @ccameron-chromium
> 
> > 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.
> 
> This is a bit of a contrived example, but if we take `color(display-p3 1 0.25 0.3)`, clipping gives `#ff1b43` and the spec algorithm gives `#ff4050`. On a `#242424` background, the spec's result (which is noticeably, if not hugely, lighter) [passes](https://webaim.org/resources/contrastchecker/?fcolor=FF4050&bcolor=242424) the WCAG AA contrast requirement for normal text while the clipped result [fails](https://webaim.org/resources/contrastchecker/?fcolor=FF1B43&bcolor=242424).

If one changes the background by one pixel value from`#242424` to `#252525`, then `#ff4050` [also fails](https://webaim.org/resources/contrastchecker/?fcolor=FF4050&bcolor=252525), so this example shows a place where the result of gamut mapping very marginally passed while clipping marginally failed.

Meanwhile `color(display-p3 1 0.25 0.3)` passes all the way up to `#292929`, where both sRGB results fail hard.

-- 
GitHub Notification of comment by ccameron-chromium
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-2023984610 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 21:02:17 UTC