Color Gamut Converter

A code value only means a color once you know its gamut: the primaries and white point it was encoded against. This page converts RGB values between Rec.709 / sRGB, Display P3 and Rec.2020 in linear light, and tells you plainly when the color does not exist in the target gamut.

the gamut the values were encoded in
the gamut you are delivering into
applied to both sides, so code values stay comparable
whole numbers for 8-bit and 10-bit
0 to 255
0 to 255
0 to 255
Enter a color and choose the two gamuts to see the converted values.

The math is a change of primaries, not a change of look: the values are decoded to linear light, carried through CIE XYZ with the D65 white point shared by all three spaces, and re-encoded in the target. A color inside the target gamut converts exactly; one outside it has no valid code, so every target channel is reported before clipping and the clipped codes are shown separately. A DCP or cinema P3 target uses a different white point and is not modeled here, and the page does not read ICC profiles or tag images. Nothing is stored and the page makes no network requests.

Primaries and white point

GamutRed x, yGreen x, yBlue x, yWhite x, y

Rec.709 and Display P3 share the D65 white point; Rec.2020 uses the same white with much wider primaries. Because the white point is common, the conversion needs no chromatic adaptation — only a 3×3 matrix built from these coordinates.

How the conversion works

A gamut is two things: the chromaticity of its red, green and blue primaries and the white point they add up to. Rec.709 (the HDTV gamut, also the sRGB gamut) and Display P3 both use D65 white; Rec.2020 uses the same white with primaries close to the spectral locus. The three spaces therefore differ only in their primaries, which makes the conversion a linear-algebra step.

This is a calculator for checking and converting values, not a color-management engine. It treats all three spaces as display-referred D65 RGB, ignores camera logs, HDR transfers, ICC profiles and cinema white, and assumes the source values really were encoded in the chosen gamut and curve. Use the HDR transfer function converter when you need PQ or HLG luminance.