Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: mapping of color space names - CSS space ids/function names, Color.js serialized, and Color.js space ids #465

Open
sidewayss opened this issue Feb 29, 2024 · 6 comments

Comments

@sidewayss
Copy link
Contributor

sidewayss commented Feb 29, 2024

The attached pdf and Excel files are a matrix of the three different versions of string color space ids/names/tokens. The docs should include a version of this matrix and an explanation of the rules for creating derived versions of the names, like the serialized --a98-rgb-linear versus rec2100pq.

color space names.pdf
color space names.xlsx

@svgeesus
Copy link
Member

svgeesus commented Mar 4, 2024

Nice, although it is missing color space names from the (very new) CSS Color HDR

@sidewayss
Copy link
Contributor Author

sidewayss commented Mar 4, 2024

Any idea when those new color spaces be available in browsers?

@sidewayss
Copy link
Contributor Author

sidewayss commented Mar 4, 2024

I updated the pdf and xlsx files to include the new CSS HDR color spaces, in gray. Note that Color.js has REC2020 linear, but not REC2100 linear. It's the only one of the new spaces not currently supported by Color.js. Note that the Color.js ids/serialized names for REC2100-HLG and -PQ are now mismatched with CSS too. But now the only non-CSS serialized value that doesn't start with "--" is lab-d65.

@svgeesus
Copy link
Member

Note that Color.js has REC2020 linear, but not REC2100 linear. It's the only one of the new spaces not currently supported by Color.js.

Because we define these spaces over the extended range, and because these two use a linear-light transfer function, and because they use the same primary chromaticities and white point, they are two names for the same thing. See

@svgeesus
Copy link
Member

Any idea when those new color spaces be available in browsers?

Around the same time that Canvas HDR is supported in browsers.

@svgeesus
Copy link
Member

Note that the Color.js ids/serialized names for REC2100-HLG and -PQ are now mismatched with CSS too

Yes we should fix those serialized forms in color.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants