[csswg-drafts] [css-color-5] A single color should still be converted to the interpolation space (#12234)

romainmenke has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-5] A single color should still be converted to the interpolation space ==
See: https://drafts.csswg.org/css-color-5/#color-mix-result


> 4. If items is length 1, set color to the color of that sole item.

Since converting to the interpolation space only happens in `4.2` and `4.2` only applies when there is more than 1 item, a single color is never converted.

So `color-mix(in oklch, red)` yields `red` and not `oklch(0.628 0.258 29.234)`

While `color-mix(in oklch, red, red)` would yield `oklch(0.628 0.258 29.234)`.

I suggest we always convert to the interpolation space:

> If items is length 1, set color to the color of that sole item, converted to the specified interpolation `<color-space>`

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12234 using your GitHub account


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

Received on Monday, 26 May 2025 10:06:21 UTC