-
Notifications
You must be signed in to change notification settings - Fork 19
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 for HDR values? #24
Comments
Many CSS colors are defined as 8 bit per component, yes. For sRGB: other sRGB colors take a float (for backward compat with CSS1, this uses a percentage): (this example happens to use integer percent values, but it need not)
More recently added color functions tend to use a normalized 0.0 .. 1.0 range, for example
No need to guess, the spec is explicit: (Notice that in the There are open issues on css color 4 about adding HDR support. Extending rgb() for HDR is one option. One problem is relative vs. absolute luminance. In theory, sRGB uses 80cd/m^2 for graphics white; in practice it doesn't, but scales to whatever monitor brightness has been set. For HDR content, Hybrid Log Gamma (HLG) uses relative luminance, while Perceptual Quantization (PQ) sets the peak specular white at 10,000cd/m^2. |
|
I believe CSS color 4 handles this now. |
The 2D canvas API gets colors from CSS colors. Many CSS colors are defined as 8 bit colors, example
I'm just guessing the CSS spec doesn't handle
rgb(512,0,1024)
if you want 2,0,4 float values written into a the canvas. What happens here?The text was updated successfully, but these errors were encountered: