- From: Isaac Muse via GitHub <sysbot+gh@w3.org>
- Date: Tue, 19 Nov 2024 05:26:33 +0000
- To: public-css-archive@w3.org
It should be noted if you were to treat the cylindrical space in the rectangular space and apply the premultiplication, you'd still have the same hue, that's why it doesn't make sense to premultiply the hues. The hue doesn't change, just the colorfulness when it is mixed. ```py >>> color = Color('oklch', [0.5, 0.2, 85], 0.5) >>> a, b = color.convert('oklab').get(['a', 'b']) >>> a *= color.alpha() >>> b *= color.alpha() >>> Color('oklab', [color['lightness'] * color.alpha(), a, b]).convert('oklch') color(--oklch 0.25 0.1 85 / 1) ``` I don't think compositing should really be done in a cylindrical space, but interpolating between two cylindrical colors, which is what `color-mix` is doing seems fine. > Another way of phrasing this is that the premultiplication method in the Color Level 4 draft mismatches the [definition of premultiplication](https://www.w3.org/TR/css-color-5/#color-mix-with-alpha) for color-mix in Color Level 5, which does not make an exception for hue. If I had to guess, I think omitting the statement about not premultiplying hue is just an accident, not an explicit intention. -- GitHub Notification of comment by facelessuser Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11238#issuecomment-2484738344 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 05:26:34 UTC