[csswg-drafts] [css-color-4] lch limits on hue value are a bit too limiting (#4703)

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

== [css-color-4] lch limits on hue value are a bit too limiting ==
The hue value in lch is wrapped to the range 0..360° at parse time:

>  If the provided value is negative, or is greater than or equal to 360deg, it is set to the value modulo 360.

...which seems like a very sensible thing to do, until you try to make a gradient between two colors on either side of 0°.

For example, if I tried to make an lch gradient from purple (eg hue 335°) through red (hue 0°) to orange (eg hue 60°), I have to split this into two segments - from 335° to 359.999°, and from 0° to 60°.

Hue in HSL is not limited at all, which I think is the best option: a gradient from 0° to 180° is different to one from 0° to 900°, despite the start and end colors being identical. If it is to be limited, it should be at least over a range of 720°

Was previously discussed in https://github.com/w3c/csswg-drafts/issues/289

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

Received on Sunday, 26 January 2020 16:21:43 UTC