Wide-Gamut Colors for High-End Displays
What you'll learn: How to unlock vibrant, rich colors that go beyond standard web colors for modern HDR and Display-P3 screens.
Why Wide-Gamut Matters
Traditional web colors use the sRGB color space, which covers about 35% of colors the human eye can see. Modern devices—like iPhones, high-end monitors, and HDR displays—support wide-gamut color spaces like Display-P3, which includes roughly 50% more colors. Without targeting these spaces, your designs may look duller than they could.
Think of it like upgrading from a box of 24 crayons to one with 120 colors—suddenly you can express subtle coral pinks, vivid teals, and saturated magentas that simply didn't exist before.
How to Use Wide-Gamut Colors
You've already learned about the color() function and color spaces like Display-P3, LCH, and OKLCH. To display wide-gamut colors, specify colors using these modern formats:
.vibrant-button {
/* Standard sRGB fallback */
background-color: rgb(255, 0, 100);
/* Wide-gamut Display-P3 color */
background-color: color(display-p3 1 0 0.5);
}
.rich-gradient {
/* Perceptually uniform wide-gamut color */
background: linear-gradient(
to right,
oklch(0.7 0.3 140),
oklch(0.6 0.25 250)
);
}
Browsers that don't support these spaces will ignore them and use the fallback. On capable displays, users see dramatically richer colors.
Testing Considerations
Always provide sRGB fallbacks first. Not all users have wide-gamut displays, so graceful degradation ensures everyone sees something appropriate.
Key Takeaway: Wide-gamut colors using Display-P3, LCH, or OKLCH let you create more vibrant, saturated designs on modern screens—just always include sRGB fallbacks for compatibility.