The follwing table reports the limits applied by the library when calling
functions to check if a color is in range (e.g. isInSdr()/isInHdr()), or to
clip (e.g. clipSdr()/clipHdr()). Please note that the library never
performs clipping, allowing out-of-range values, to minimize possible
computation errors. It is develpoer responsability to call clipping methods
when appropriate.
| Color Space | Components | SDR Min / Max (Standard/Integer) | HDR Min / Max (Float/Unbounded) | Notes |
|---|---|---|---|---|
| AcesCg | R, G, B | 0.0 — 1.0 | 0.0 — +∞ | |
| Adobe RGB | R, G, B | 0.0 — 255.0 | 0 — +∞ | HDR allows values >1 (super-white). |
| CMYK | C, M, Y, K | 0.0 — 100.0 |
N/A | Subtractive model (ink). Physically limited to 100%. |
| HSL | H S L |
0° — 360° 0.0 — 100.0 0.0 — 100.0 |
N/A | Cylindrical projection of SDR RGB. Not suitable for HDR math. |
| HSV | H S V |
0° — 360° 0.0 — 100.0 0 — 100 |
N/A | Cylindric model of sRGB. V (Value) is not perceptive. It is not a standard function of CSS. |
| HWB | H W B |
0° — 360° 0.0 — 100.0 0.0 — 100.0 |
N/A | Constrained by W + B \le 100.0. |
| ICtCp | I C T C P |
0.0 — 0.51 -0.25 — +0.25 -0.25 — +0.25 |
0.0 — 1.0 -0.5 — +0.5 -0.5 — +0.5 |
|
| JzAzBz | Jz Az, Bz |
0.0 — ~0.22 ~ -0.1 — +0.1 |
0.0 — 1.0 ~ -0.5 — +0.5 |
|
| JzCzHz | Jz Cz Hz |
0.0 — 0.22 0.0 — +∞ 0° — 360° |
0.0 — 1.0 0.0 — +∞ 0° — 360° |
|
| Lab | L a, b |
0.0 — 100.0 -160.0 — +160.0 |
0.0 — +∞ -∞ — +∞ |
L=100 is diffuse white. In HDR, L can exceed 100 significantly. |
| Lch | L c h |
0.0 — 100.0 0.0 — 230.0 0° — 360° |
0.0 — +∞ 0.0 — +∞ 0° — 360° |
Polar representation of CIELAB. |
| LchUv | L c h |
0.0 — 100.0 0.0 — 150.0 0° — 360° |
0.0 — +∞ 0.0 — +∞ 0° — 360° |
Polar representation of LUV. |
| Linear RGB | R, G, B | 0.0 — 1.0 | 0.0 — +∞ | Physical light energy. 0 is absolute darkness (no negatives). |
| LMS | L, M, S | 0.0 — 1.0 | 0.0 — +∞ | Cone response. Modeled as physical intensity (non-negative). |
| Lms2006 | L, M, S | 0.0 — 1.0 | 0.0 — +∞ | |
| LmsCat02 | L, M, S | 0.0 — 1.0 | 0.0 — +∞ | |
| LmsHps | L, M, S | 0.0 — 1.0 | 0.0 — +∞ | |
| LUV | L U V |
0.0 — 100.0 -100.0 — +100.0 -100.0 — +100.0 |
0.0 — +∞ -∞ — +∞ -∞ — +∞ |
|
| OKLAB | L a, b |
0.0 — 1.0 -0.4 — +0.4 |
0.0 — +∞ -∞ — +∞ |
Modern perceptual space. L=1.0 is diffuse white. |
| OKLCH | L C h |
0.0 — 1.0 0.0 — 0.5 0° — 360° |
0.0 — +∞ 0.0 — +∞ 0° — 360° |
Polar representation of OKLAB. |
| P3 | R, G, B | 0.0 — 255.0 | 0 — +∞ | Uses sRGB gamma but wider primaries. |
| ProPhoto RGB | R, G, B | 0.0 — 255.0 | 0 — +∞ | |
| Rec.2020 | R, G, B | 0.0 — 255.0 | 0.0 — +∞ |
Standard for HDR TV. Covers most visible colors naturally. |
| Rec.709 | R, G, B | 0.0 — 255.0 | 0.0 — +∞ | |
| RGB | R, G, B | 0.0 — 255.0 |
0.0 — +∞ |
Negatives encode wide-gamut colors; >1 encodes HDR brightness. |
| xyY | x y Y |
0.0 — 0.8 0.0 — 0.9 0.0 — 1.0 |
0.0 — 1.0 0.0 — 1.0 0 — +∞ |
|
| XYZ (D65) | X, Z Y |
0.0 — 1.1 0.0 — 1.0 |
0.0 — +∞ 0.0 — +∞ |
Y scales linearly with physical light intensity (Nits). |
| XYZ D50 | X, Z Y |
0.0 — 1.1 0.0 — 1.0 |
0.0 — +∞ 0.0 — +∞ |
Y scales linearly with physical light intensity (Nits). |
| YCbCr | Y cb, cr |
0.0 — 255.0 0.0 — 255.0 |
0.0 — +∞ 0 — +∞ |
|
| YUV | Y U V |
0.0 — 1.0 -0.436 — +0.436 -0.615 — +0.615 |
0.0 — +∞ -∞ — +∞ -∞ — +∞ |
clipSdr() should clamp values strictly to these min/max
limits.isInSdr() returns true if values are within these bounds.clipSdr() logic here.clipHdr() generally does no clamping for "Unbounded"
types, or max(0, val) for physical types (Linear/XYZ) to prevent
mathematical errors with negative light.isInHdr() returns true if values are within these bounds.