Skip to content

[css-color-4] Serialization rules for hue component of lch() and oklch() #7782

@weinig

Description

@weinig

It was brought to my attention in #7750 that in CSS Color 4 the <hue> is is defined with the following:

This number is not constrained to the range [0,360] but is unbounded. Certain operations, such as hue interpolation, may normalize the hue angle during calculations.

(https://www.w3.org/TR/css-color-4/#hue-syntax)

Currently in WebKit, we normalize hues to [0, 360] for serialization, but I can't find anything that requires that in the spec.

It would be good to clarify the intent and perhaps add some examples of hue > 360 and hue < 0 getting serialized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions