Skip to content

[css-color-4] lab and oklab inconsistencies #8138

@Juanmihd

Description

@Juanmihd

This is a question regarding parsing and serialization of lab, lch, oklab and oklch values.

The lightness in all these four color spaces can be specified either as a <percentage> or as a <number>.
In both lab and lch, these values are interpreted this way:

Percent reference range
for L: 0% = 0.0, 100% = 100.0
for C: 0% = 0, 100% = 150

Instead for oklab and oklch , these values are interpreted this way:

Percent reference range
for L: 0% = 0.0, 100% = 1.0
for C: 0% = 0.0 100% = 0.4

We believe that it would be clearer if both behave in a similar way.

Is there any reason why this was decided this way?

This issue impacts as well ab values in lab vs oklab.

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.css-color-4Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions