Re: [csswg-drafts] [css-color-4] Do gradients/animations using lab/lch colors interpolate in the Lab colorspace? (#4647)

How about the following heuristic then:

- Interpolation between colors of the same color space is done in that color space
- Interpolation between colors of different color spaces, where one color space is a strict subset of the other is done in the wider color space
- Any other interpolation is done in Lab

The heuristic can easily be overridden to a wider color space with the relative color syntax from #3187 that is added in Color 5.

> A gradient from device-cmyk to sRGB, or sRGB to Lab, or some other exotic combination is fairly unikely to give good results, and I'd expect would be down to the user not understanding what they've asked for. 

Not necessarily. It could be between a variable/user defined color and a fixed color. I don't think we should brush off such use cases.

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

Received on Monday, 6 January 2020 14:47:25 UTC