Re: [css-houdini-drafts] [css-typed-om] Color models and color spaces are mixed in CSSColorValue (#1044)

I agree that it is confusing. In general "RGB" should be taken to mean an overall color model, in some unspecified colorspace.

However these names come from the CSS syntax, and have existed since CSS1; and in that specific usage, the `rgb()` function does not mean "some random RGB colorspace" but means "[a color in the sRGB colorspace](https://drafts.csswg.org/css-color-4/#numeric-srgb)". Similarly, in CSS syntax, both `hsl()` and `hwb()` [refer to a color in the sRGB colorspace](https://drafts.csswg.org/css-color-4/#the-hsl-notation):

> HSL colors resolve to sRGB.
> HWB colors resolve to sRGB

For `device-cmyk` you are quite correct; this is really a color model and, although [we try to provide a colorimetric interpretation](https://drafts.csswg.org/css-color-4/#device-cmyk) this is not always possible. (Note that [calibrated CMYK color spaces are also supported in CSS](https://drafts.csswg.org/css-color-4/#cal-cmyk), via [the `color()` function](https://drafts.csswg.org/css-color-4/#color-function) together with the [`@color-profile` rule](https://drafts.csswg.org/css-color-4/#at-profile)).

The basic problem is that the CSS Typed OM, like the CSS OM, is tightly coupled to the CSS syntax and is primarily concerned with reflecting back to script exactly what CSS syntax was originally used to define the color. It is not a general Color object model for the Web platform. Therefore, the terminology has to be understood within the specific, largely historical, confines of CSS syntactic forms

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1044#issuecomment-870699202 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 29 June 2021 15:28:23 UTC