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-hdr] CSS syntax for HDR colors parameterized by headroom #11616

Open
svgeesus opened this issue Jan 30, 2025 · 4 comments
Open

[css-color-hdr] CSS syntax for HDR colors parameterized by headroom #11616

svgeesus opened this issue Jan 30, 2025 · 4 comments
Labels
Agenda+ css-color-hdr CSS HDR extension

Comments

@svgeesus
Copy link
Contributor

@ccameron-chromium suggested a mechanism for allowing CSS colors to be displayed in HDR, which copes with displays having different amounts of HDR headroom.

It also establishes, in a backwards-and-forwards compatible way, the convention that CSS colors are to be gamut mapped to the SDR gamut of the display, unless they explicitly opt-in to a potentially-higher-headroom gamut via the new syntax.

@svgeesus
Copy link
Contributor Author

Agenda+ to see if we can resolve to adopt the proposal.

@weinig
Copy link
Contributor

weinig commented Feb 1, 2025

Really glad to see this being discussed!

One thing I can't figure out from the proposal on first reading is if this allows matching the colors of an HDR image or HDR video. (Partially, this is likely a problem of me not knowing enough about how HDR images / videos are represented/ encoded).

That is, if a user has an HDR image, and for the sake of simplicity, it is all one color, is there a way to create CSS Color values that match that color in all headrooms?

@ccameron-chromium
Copy link
Contributor

That is, if a user has an HDR image, and for the sake of simplicity, it is all one color, is there a way to create CSS Color values that match that color in all headrooms?

Yes, that's the goal -- to be able to create a CSS Color that will match an HDR image color in all headrooms.

In order to handle all possible ISO 21496-1 images, the "it may be worth adding those as parameters to be able to color match with gain map images" would need some elaboration.

If there's consensus around this general approach, then I can flesh out those details.

@weinig
Copy link
Contributor

weinig commented Feb 2, 2025

Great. Ok, after reading a bit more about ISO 21496-1 images I think I understand the idea (I do wish those ISO specs were not behind paywalls, but I digress and should just fork over some cash).

Generally, and for matching images that use ISO 21496-1 gain map, this seems like a great way forward to me.

One thing that might make sense in addition to adding parameterization (primaries of the space, esp value, etc.) of the interpolation space would be a way to explicitly use an image's metadata. For example:

  color-hdr(matching url(myImage.png),
      color(rec2100-linear 0.9 1.0 0.8) 1,
      color(rec2100-linear 1.8 2.0 1.5) 2);

What about HDR images that don't use ISO 21496-1 gain maps? (I think one can make an HDR image that has no gain map, presumably getting some default tone-mapping from the system?)

Any thoughts on HDR video?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda+ css-color-hdr CSS HDR extension
Projects
None yet
Development

No branches or pull requests

3 participants