Convert HEX to CMYK for print
A HEX to CMYK converter turns a web color code into cyan, magenta, yellow and black ink percentages. It gives you a quick starting point when a logo or brand color defined for screens has to appear in a print layout, on a sign or in a packaging brief.
Light versus ink
Hex codes describe light: red, green and blue added together on a screen, with all three at full strength making white. CMYK describes ink on paper, which works the other way round. Each ink absorbs part of the light, so more ink gives a darker result. Cyan is the opposite of red, magenta of green and yellow of blue, while K (key) is black ink that deepens shadows and saves colored ink.
The formula this tool uses
The hex code is decoded to RGB and each channel is divided by 255. Then:
K = 1 − max(R, G, B)
C = (1 − R − K) / (1 − K)
M = (1 − G − K) / (1 − K)
Y = (1 − B − K) / (1 − K)
(when K = 1 the result is 0%, 0%, 0%, 100%)
Worked example with the indigo #6366F1:
#6366F1 → rgb(99, 102, 241)
R = 0.3882 G = 0.4000 B = 0.9451
K = 1 − 0.9451 = 0.0549 → 5.5%
C = (1 − 0.3882 − 0.0549) / 0.9451 = 0.5892 → 58.9%
M = (1 − 0.4000 − 0.0549) / 0.9451 = 0.5768 → 57.7%
Y = (1 − 0.9451 − 0.0549) / 0.9451 = 0 → 0%
→ cmyk(58.9%, 57.7%, 0%, 5.5%)
Pure black #000000 becomes cmyk(0%, 0%, 0%, 100%), and white #FFFFFF becomes all zeros: no ink at all, so the paper shows through.
This is not a color-managed conversion
The formula above is the textbook mathematical conversion. Professional print work uses ICC color profiles that describe a specific press, ink set and paper, and those produce different numbers, often with less black and more colored ink in the shadows. The formula also can't warn you that a color is outside the printable range: vivid screen colors such as #1E90FF will print noticeably duller than they look.
Treat the result as an informed first guess. For anything that must match, ask your printer for their profile, convert in a color-managed application and approve a physical proof. Brand colors that must be exact are often specified as spot inks rather than CMYK mixes.
Other details
- Percentages are rounded to one decimal place.
- The alpha byte of an eight-digit hex code is ignored, since ink has no transparency setting. Flatten semi-transparent colors onto white first, as described in RGBA to CMYK.
- Because K takes the entire grey component, at least one of C, M or Y is always 0% in the output.
To go the other direction, use CMYK to HEX, or start from channel values with RGB to CMYK.