Re: [csswg-drafts] [css-color-4] Expand the concept of analogous components to analogous sets of components to minimize `none` → `0` conversions (#10210)

> The issue isn't necessarily pulling the missing components through intermediate spaces, it's that if you default them to 0 you get hsl(120deg 0% 0%) which converts to color(srgb 0 0 0) which converts to hwb(0deg 0% 0%) which is then normalized to hwb(none 0% 0%) because the hue is powerless. You'd need some explicit way of bringing forward the hue to avoid this.

At least with hsl and hwb, you could special case this as the hue is the same for hsl and hwb, but this is only because these models are based on the same hue calculations. As soon as you convert these to LCh and OkLCh, there is no preserving hue without having the full context of the color; that is just the nature of how the perceptual color models work. A hue of 300 in hsl could be a range of different hues in LCh or OkLCh depending on the lightness and saturation.

Undefined hues have consequences during conversions. If you don't force them to a default, they become infectious, and if you do, you assume some default which can change values during conversions. If you happen to know the relationship some of the spaces during conversion, you can certainly make special decisions and maybe preserve certain attributes, but it will not consistently translate with all conversions.

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


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

Received on Thursday, 23 July 2026 23:00:20 UTC