Skip to content

[css-color-4] Allow any color space as part of the interpolation method? #7907

Closed
@mirisuzanne

Description

@mirisuzanne

Currently, the color-interpolation-method syntax production accepts a limited list of color spaces for interpolation:

<rectangular-color-space> = srgb | srgb-linear | lab | oklab | xyz | xyz-d50 | xyz-d65
<polar-color-space> = hsl | hwb | lch | oklch

That leaves out several of the predefined rgb spaces like display-p3, rec2020, and so on. I imagine that's because all rgb spaces would give a similar (the same?) result to either srgb or srgb-linear - so there's no particular use-case? But I think this makes it harder to teach. If srgb and display-p3 interpolation would have the same result, why not allow authors to use either one? Both are well defined and meaningful, they just happen to be an alias for the same thing. But why should we need to memorize which is the right rgb interpolation space?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions