Skip to content

[css-color-4] Deprecated and un-deprecated system colors should not be limited to sRGB #8312

Closed

Description

@svgeesus

As far as I can see, currently in all browsers, the system colors resolve to sRGB.

But going forward that might not be the case, and requiring gamut mapping or clamping to the sRGB gamut seems undesirable.

in Resolving other colors the spec tries to look forwards here, with a somewhat aspirational

Each keyword computes to the corresponding color in its color space. However, such colors must not be altered by 'forced colors mode'.

In contrast the sections on resolving and serializing correspond to current reality, in that the computed value of a system color is an sRGB color which is required to serialize in the legacy, comma-separated rgb() or rgba() form which also uses a 0.0 to 255.0 range, has a minimum 8-bit precision, and thus cannot represent out-of-sRGB-gamut colors.

Activity

  1. svgeesus commented on Dec 16, 2023

    @svgeesus
    CollaboratorAuthor

    I guess if anyone does set a system color to a non-sRGB syntax, like color(), they can just follow the rules for that format when serializing the value.

  2. added
    Commenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.
    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.
    on Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.Commenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.css-color-4Current Work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions