Re: [csswg-drafts] [css-color-4] Premultiplication in cylindrical spaces and mixing (#11238)

> Premultiplication is used essentially to weight how much each color influences the interpolation. This works well in rectangular coordinate systems. 

Right, premultiplication is a weighting method designed to model compositing. It is only a meaningful operation when applied to *vector* coordianates, that have a meaningful notion of "scaling". Hue, in a cylindrical space, is not such a coordinate; there is no privileged zero point. I think the technical term is that the hue is an *affine* coordinate, which doesn't allow addition or scaling. You can only add/scale *differences between hues*; the set of hue differences forms a vector space. This is why you can *interpolate* hue (you're scaling a hue difference, and adding it to a hue, which is also allowed).

So the concept of premultiplying a cylindrical space simply isn't coherent. You have to do premult in a rectangular space, and as Chris says, if you're premultiplying in order to composite, there's only a handful of color spaces intended for that.

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


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

Received on Tuesday, 19 November 2024 17:55:57 UTC