Re: [csswg-drafts] [css-color-5] [css-values-4] Interpolation and mixing of colors (#5392)

In V&U [8.1.1. Combination of <color>](https://drafts.csswg.org/css-values-4/#combine-colors)

> Interpolation of <color> is defined as the independent interpolation of each component (red, green, blue, alpha) as a <number>. Interpolation is done between premultiplied colors (that is, colors for which the red, green, and blue components specified have been multiplied by the alpha).

This has a number of problems:

1. It assumes additivity, but operations are performed on a non-additive (gamma corrected) component. As is well known, this gives substantial error. But it is also how the Web currently works, so any better solution needs to be opt-in.
2. It assumes an orthogonal, rectangular coordinate system - which RGB is, but polar forms such as HSL HWB LCH are not. Clearly you don't multiply an alpha of 50% with a hue angle of 120deg to get 60deg, for example.
3. It assumes sRGB only. The section on Color interpolation does not.

So I'm looking for improved wording for the alpha premultiplication step which is color-space agnostic, ideally has an opt-in to linear-light computation (un-gamma-corrected RGB, or equivalently CIE XYZ to handle multiple spaces) which can be added to CSS Color 5 Interpolation section.

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


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

Received on Friday, 18 September 2020 14:24:45 UTC