Skip to content

[css-color-5] Unclear if same-space RCS actually triggers a conversion #8452

@tabatkins

Description

@tabatkins

In Section 3, we have the text:

If the origin color was originally specified with a different color function, it’s first converted into the chosen color function, so it has meaningful values for the channels.

This seems pretty clear - if you write oklch(from oklch(0% 50% 150deg) l c h) no conversion should take place, so the "components that are powerless after color space conversion become missing instead" from Color 4 doesn't apply, and the result is indeed identical to the input color.

But the later individual color-function sections have the text:

r, g, and b are all <number>s that correspond to the origin color’s red, green, and blue channels after its conversion to sRGB.

(or the equivalent for any given set of channels)

This directly says "after its conversion", implying an unconditional conversion happens. I suspect we want to make this more circumspect, like "red, green, and blue channels (after its conversion to sRGB, if necessary)".

(This issue confused a teammate, so it's a real-world issue in the spec's readability.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions