W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2021

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

From: Chris Lilley via GitHub <sysbot+gh@w3.org>
Date: Thu, 28 Jan 2021 01:54:00 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-768740062-1611798839-sysbot+gh@w3.org>
@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.


> 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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:25 UTC