hex to Display P3

The same colour expressed in the wider P3 gamut, so the numbers are smaller than the sRGB ones. P3 can also describe colours sRGB cannot reach at all.

Hue
Alpha
100%
Display P3
color(display-p3 0.3279 0.5231 0.9309)

Paste a hex value — other formats work too.

Need every format at once? Open in the full picker

Worked examples

Common colours converted from hex to Display P3, computed with the same engine the picker uses.

ColourhexDisplay P3Copy
Pure red#ff0000color(display-p3 0.9175 0.2003 0.1386)
Pure green#00ff00color(display-p3 0.4584 0.9853 0.2983)
Pure blue#0000ffcolor(display-p3 0 0 0.9596)
White#ffffffcolor(display-p3 1 1 1)
Mid grey#808080color(display-p3 0.502 0.502 0.502)
Black#000000color(display-p3 0 0 0)
Interface blue#4287f5color(display-p3 0.3279 0.5231 0.9309)
Success green#22c55ecolor(display-p3 0.3692 0.7613 0.4136)
Danger red#ef4444color(display-p3 0.8651 0.3219 0.2966)
Warning amber#f59e0bcolor(display-p3 0.9122 0.6349 0.2305)
Editor black#1e1e1ecolor(display-p3 0.1176 0.1176 0.1176)
Warm sand#e9c46acolor(display-p3 0.8902 0.774 0.4674)

How the conversion works

The same colour expressed in the wider P3 gamut, so the numbers are smaller than the sRGB ones. P3 can also describe colours sRGB cannot reach at all.

Both formats are computed from a single canonical representation — CIE XYZ with a D65 white point, held in floating point — rather than by chaining one format into the next. That matters because chained conversions accumulate rounding error, and because it means a colour that cannot be represented in the target format is handled deliberately rather than by accident.

When the source describes a colour outside the target's gamut, chroma is reduced in OKLCh while lightness and hue are held, following the CSS Color 4 gamut mapping algorithm. Clipping each channel independently would be simpler but visibly shifts hue on saturated colours.

Related conversions