- From: Chris Lilley via GitHub <sysbot+gh@w3.org>
- Date: Tue, 02 Nov 2021 13:20:18 +0000
- To: public-fxtf-archive@w3.org
> I think the one thing it's missing is the final unpremultiplication at the end of flattenColors; simpleAlphaCompositing gives you a premultiplied component but the Color constructor takes unpremultiplied components. So the code will give incorrect results whenever the composited result is non-opaque. This is defined in CSS Color 4: [13.2. Interpolating with alpha](https://drafts.csswg.org/css-color-4/#interpolation-alpha): > When the colors to be interpolated are not fully opaque, they are transformed into premultiplied color values as follows: > * For rectangular orthogonal color coordinate systems, all component values are multiplied by the alpha value > * For cylindrical polar color coordinate systems, the hue angle is not premultiplied, but the other two axes are premultiplied. > To obtain a color value from a premultipled color value, each component which had been premultiplied is divided by the interpolated alpha value. -- GitHub Notification of comment by svgeesus Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/440#issuecomment-957556870 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 2 November 2021 13:20:20 UTC