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 while the clipped result [fails](https://webaim.org/resources/contrastchecker/?fcolor=FF1B43&bcolor=242424).

I don't know how many P3 colors' mappings fall on opposite sides of the WCAG 4.5 knife's edge like this when mapped to sRGB, but I do know that when mapping to smaller spaces, preserving hue + lightness/contrast is the best thing to do by default; for folks who want chroma, there are media queries.

-- 
GitHub Notification of comment by eeeps
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-2023935827 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 20:34:09 UTC