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

> > 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.
> 
> Yes. I'm thinking particularly of gradients where all the stops are in some form of sRGB and then, one stop gets changed to display-p3 or rec2020 or whatever.

Oh, one thing I learned recently is that WebKit is actually already a bit non-compliant in this case. WebKit interpolates a gradient in the so-called "Extended sRGB" color-space, which is just sRGB without the clamping and in the negative it is sign-reversed in the negative. So, if you do:

```
background: linear-gradient(90deg, color(display-p3 1 0 0) 0%, color(display-p3 0 1 0) 100%);
```

(or any other color that has a wider gamut than sRGB), we produce a gradient that includes those colors, but uses the sRGB curves.


I kind of doubt anyone is relying on this, but I don't know for sure.

-- 
GitHub Notification of comment by weinig
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5833#issuecomment-786941582 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 23:06:14 UTC