A gamut is the range of colors a device can display or a color notation can represent. This matters when choosing CSS colors: a screen may support colors that an older notation cannot specify. section 11.2.1
Common display gamuts differ in reach:
- sRGB is the familiar, narrower range. Hex and rgb() values are limited to it. section 11.2.1 section 11.2.2
- Display P3 spans approximately 25% more colors than sRGB and is available on many smartphones and high-end laptops. section 11.2.1
- Rec2020 reaches about 75% of visible color, but only select monitors support it. section 11.2.1
Check before using a wider gamut
When a design calls for color beyond sRGB, choose a newer CSS color notation rather than assuming a hex value can express it. Use @media (color-gamut: p3) to apply styles only when the browser and hardware support P3. section 11.2.1
Figure 11.9 Representation of display gamut color ranges
Compare the illustrated ranges to see how much visible color lies outside sRGB. section 11.2.1
A color picker can help keep a chosen color within the desired gamut while adjusting a palette. section 11.3.4
