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

[css-color-4] Define target for gamut mapping for 2D canvas #10112

Open
ccameron-chromium opened this issue Mar 21, 2024 · 0 comments
Open

[css-color-4] Define target for gamut mapping for 2D canvas #10112

ccameron-chromium opened this issue Mar 21, 2024 · 0 comments
Labels
css-color-4 Current Work

Comments

@ccameron-chromium
Copy link

When rendering a CSS color such as our friend oklch(90% 90% 0deg) to a 2D canvas, what gamut should the color be mapped to?

It's not possible to map to the gamut of the display. Two reasons:

  • The display is not knowable in general. E.g, an offscreen canvas, something being streamed to a video or saved as images, or there could be multiple displays.
  • If the display is known, mapping to the gamut of the display is a potent fingerprinting vector.

It may be that the target of mapping should be the color space of the canvas. For the moment this is reasonable.

When we start supporting float16 canvases, it could be less obvious. E.g, an sRGB canvas with float16 pixels can express an arbitrarily wide gamut, so gamut mapping to sRGB would impose undesirable restrictions.

@svgeesus svgeesus added the css-color-4 Current Work label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-color-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants