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

> If an author does not want this physical meaning then they should not specify this color, right?

This is the crux of the issue. If we were processing HDR photos and/or Video, I would say you were right. The right tool for the job and all that. But that's not how CSS is going to be used by the average user who wants gradients, foregrounds, and backgrounds. 

If they do something like this, they most likely want hues of the same perceptual lightness, not with similar chroma. You can't preserve everything, so you have to choose. What is the most important based on what you are doing.

```
linear-gradient(in oklch to right, color(display-p3 0 0 1), color(display-p3 1 0 0))
```

These different hues naturally have different chroma limits.  These are also SDR gamuts, we should not suddenly enforce HDR colors on them. I think HDR colors should be handled in the HDR spec with special considerations on how and when you would enforce HDR mappings.

I'm not saying there isn't value in what you are suggesting, only that it doesn't make sense for the use case. What's important is the intent and the use case. I think your other argument was to use something like Okhsl to maybe fix this issue, but you do lose some things with Okhsl. Bjorn talked about this a little with in his blog about Okhsl: https://bottosson.github.io/posts/colorpicker/#what-makes-a-good-color-picker%3F.

> Note: These properties are in conflict, so designing a color space for color picking is a about finding which tradeoffs to make. In particular, independent control of hue, lightness and chroma can not be achieved in a color space that also maps sRGB to a simple geometrical shape.

Okhsl makes a good color picker, I don't think it makes a great interpolation space. Again, the right tool for the job and all that.

Hopefully, this makes the idea of what I'm expressing more clear. I think I have a better understanding of where you are coming from as well. I think there is a difference in ideology. I think we should make sure the tool works well for the customer (the user of CSS) and how they are working, not try to force a solution on them that they didn't ask for.


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


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

Received on Thursday, 7 March 2024 12:38:38 UTC