[csswg-drafts] [css-color-4] Hue interpolation "specified" should be moved into a later spec (#7750)

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

== [css-color-4] Hue interpolation "specified" should be moved into a later spec ==
Although it sounds like a reasonable and simple idea, the interpolation method called `"specified"` by the spec is actually extremely costly and complex to be implemented by UAs. The reason for it is that is breaks a basic assumption about colors, namely, that they (apart from some loss of precision) can be represented and converted between different systems. 

UAs usually choose an internal color representation (like sRGBA). Hue-based systems (like HSL, HWB) are, in practice, expected to have Hues defined in the `[0, 360)` region. Outside of that region, colors can be converted out of them, but not preserved. To allow internal representation of arbitrary Hues, UAs need to have special code to store those types of color representation throughout their pipelines.

We can see a problem caused by this on the current Safari TP implementation of `hue specified` gradients, where Safari follows the proper algorithm (numeric interpolation of hue values), but fails to preserve their value outside of `mod 360` (since they are internally converted to sRGB), creating a weirdly unspecified behavior, that doesn't address the original spirit of the spec (the ability to have multiple rotations on the hue circle in a single gradient interpolation).

Considering that it does seem like a reasonable request, but also understanding that there's no pressing use case for it and that there's a big implementation complexity, we'd like to request that this small section of the spec to be removed from CSS Color 4 and then re-discussed at a later time.

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


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

Received on Thursday, 15 September 2022 21:15:03 UTC