- From: Chris Lilley via GitHub <sysbot+gh@w3.org>
- Date: Mon, 02 Oct 2023 19:47:08 +0000
- To: public-css-archive@w3.org
> As far as I could tell it isn't currently defined when the hue angle fixup step should be done. Only that it should be done before linear interpolation. I think the order could be deduced from the text, such as >> If a color with a carried forward [missing component](https://drafts.csswg.org/css-color-4/#missing-color-component) is interpolated with another color which is not missing that component, the missing component is treated as having the other color’s component value. >> Therefore, the carrying-forward step must be performed before any [powerless component](https://drafts.csswg.org/css-color-4/#powerless-color-component) handling. but it required a close reading so I have [reworded it into an explicit ordered list](https://drafts.csswg.org/css-color-4/#interpolation) and added the missing steps (premultiplication, and undoing premultiplication): ```html <ol> <li>checking the two colors for [=analogous components=] which will be carried forward</li> <li>(if required) converting them to a given color space which will be referred to as the <dfn export>interpolation color space</dfn> below</li> <li>(if required) re-inserting carried-forward values in the converted colors</li> <li>(if required) fixing up the hues, depending on the selected <<hue-interpolation-method>></li> <li>changing the color components to premultiplied form</li> <li>linearly interpolating each component of the computed value of the color separately</li> <li>undoing premultiplication</li> </ol> ``` So, any carried-forward hues will be re-inserted into the converted colors, before the hue-fix-up stage (otherwise, the required constraints on hue angles would not be met). Premultiplication [does not affect hues components](https://drafts.csswg.org/css-color-4/#interpolation-alpha). > `color-mix(in hsl longer hue, hsl(90deg 50% 50%), hsl(none 50% 50%)` This is `none` is replaced (step 3) with `90deg` before the fixup (step 4) and becomes 270deg -- GitHub Notification of comment by svgeesus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9224#issuecomment-1743654114 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 2 October 2023 19:47:09 UTC