Re: [csswg-drafts] Don't force non-legacy colors to interpolate in a gamma-encoded space (#5883)

@LeaVerou  wrote:

> Where to define interpolation? Since Color 4 defines the actual color values, Color 4 needs to define how they interpolate. We cannot define values in one level and interpolation in the next level and we can't have level N citing level N+1.

[done](https://github.com/w3c/csswg-drafts/commit/09bc009d01321f3581b901c1a11f1b2f51fa8913)

> How to interpolate? In previous discussions, the rule we had discussed was that if two colors are in the same color space, they interpolate in that color space, otherwise in Lab. After further thinking, I don't think that's a good idea. It does maintain backwards compat for old sRGB forms, but it forces new RGB forms like color(display-p3) or even color(srgb) (which we resolved in #5825 that is stored separately from legacy sRGB formats) to also interpolate in gamma-corrected space. Instead, I think the rule should be that colors interpolate in Lab (or XYZ), unless both colors being interpolated are legacy sRGB forms (for backwards compat) OR the host syntax defines a different interpolation space (e.g. color-mix()).

[also done](https://github.com/w3c/csswg-drafts/commit/aba4ebb74a761892d298f85905d11bd4eaea9a7c)

Still needs some examples, but please review.

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


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

Received on Thursday, 28 January 2021 01:54:02 UTC