CMYK to hex

Screen colour cannot fully represent ink, so this is an approximation in both directions.

Hue
Alpha
100%
hex
#4287f5

Paste a CMYK value — other formats work too.

Need every format at once? Open in the full picker

Worked examples

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

ColourCMYKhexCopy
Pure redcmyk(0%, 100%, 100%, 0%)#ff0000
Pure greencmyk(100%, 0%, 100%, 0%)#00ff00
Pure bluecmyk(100%, 100%, 0%, 0%)#0000ff
Whitecmyk(0%, 0%, 0%, 0%)#ffffff
Mid greycmyk(0%, 0%, 0%, 49.8%)#808080
Blackcmyk(0%, 0%, 0%, 100%)#000000
Interface bluecmyk(73.1%, 44.9%, 0%, 3.9%)#4287f5
Success greencmyk(82.7%, 0%, 52.3%, 22.7%)#22c55e
Danger redcmyk(0%, 71.5%, 71.5%, 6.3%)#ef4444
Warning ambercmyk(0%, 35.5%, 95.5%, 3.9%)#f59e0b
Editor blackcmyk(0%, 0%, 0%, 88.2%)#1e1e1e
Warm sandcmyk(0%, 15.9%, 54.5%, 8.6%)#e9c46a

How the conversion works

Screen colour cannot fully represent ink, so this is an approximation in both directions.

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