Re: [csswg-drafts] [css-color-hdr] Allow H1 to be zero, or not? (#11786)

I think I see the problem. The spec [defines headroom](https://drafts.csswg.org/css-color-hdr-1/#defining-dynamic-range) in stops above reference white, so SDR is headroom `0` and HDR with three stops of headroom is `3`.. The original proposal uses a linear scale, so SDR has a headroom of `1` and HDR with three stops of headroom is `8`.

This is also why  **Interpolating colors based on headroom** takes the log of each headroom value, rather than using it directly.

The ISO definition of headroom also uses the log value.

![Image](https://github.com/user-attachments/assets/c9b8b717-b0c5-443e-b232-d9bd11988ec8)

Consistently using the logarithmic value (ie in stops) has the following advantages:

- an SDR system, with **no** headroom (reference white is peak white) has `H` of `0`, not `1`
- the headroom values are evenly spaced, perceptually
- the calculations are simplified, because there is no need to log the headroom values

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


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

Received on Monday, 3 March 2025 19:41:54 UTC