Re: [csswg-drafts] [css-images-4] Consider allowing gradients to include a color space for interpolation to take place in (#5833)

> * "auto" is currently defined as _"the user agent can choose either the sRGB or linearRGB spaces for color interpolation. This option indicates that the author doesn't require that color interpolation occur in a particular color space"_. I'd propose changing this to be be "Choose "srgb" for colors specified as sRGB or HSL, and otherwise act as "match".
> * "match" means use the color-space of the colors being interpolated. So two sRGB colors interpolate in sRGB, two HSL colors in HSL, two LCH colors in LCH. If the colors have different spaces, the interpolation is in LCH.
> * "lch", "srgb", "linearrgb" - interpolation always happens in that space.

What would the intended use case of something like `auto` or `match` be for something like gradient. 

In general, I think we should try to avoid defaults and automatic picking of color spaces, especially based on input colors, as I think the results can be quite confusing. By always requiring a specific color space (or color-interpolation), (except for legacy case of sRGB where it is excluded), I think it makes it easier to explain the concept to new users.

It certainly has been the case for me that the more explicit tagging of input and output color spaces in our code (that is, in WebKit internals, so a bit different I will admit) has made things easier to understand and follow.

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


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

Received on Friday, 26 February 2021 17:03:59 UTC