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

I'm excited to see multiple algorithms emerging, and it raises the question of what criteria should be used for testing, comparison, and ultimately selection?

The criteria I'm seeing from this thread are that it needs to:

1. Be reproducible in multiple languages and by multiple libraries, so that a color appears consistently on a device, regardless of software. We could consider exposing it through a native `Color.toGamut` API, but it would still need to be replicable in non-browser environments. 
2. Be fast.
3. Display colors as close to the specified color as possible. What this means is undefined but needs to be quantified and agreed on. Judging this will be more difficult for colors that can not be created on any display or that can not be perceived by the eye.
5. Prioritize maintaining as much lightness and hue info as possible, over chroma.
6. Produce gradients that appear smooth.
7. Handle any input color space, and any output RGB space.
8. Limit the potential for unexpected changes as devices improve.

I think it would be worth breaking out the related question of how to help authors stay in gamut into a separate thread, and keep this focused on how we handle the inevitable cases where they do not.

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


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

Received on Thursday, 15 February 2024 16:59:20 UTC