Screens mix light, printers mix ink — so a HEX code has to be translated before anything goes to press. This converter gives you the cyan, magenta, yellow and key percentages that match your web color as closely as ink allows.
How HEX to CMYK conversion works
- Convert the HEX code to RGB and divide each channel by 255.
- Compute the key (black) component: K = 1 − max(R, G, B).
- Derive the other inks by removing that black share: C = (1 − R − K) / (1 − K), and the same formula for magenta and yellow.
- Multiply all four values by 100 to get percentages. Pure black short-circuits to 0/0/0/100.
Worked example
This is a device-independent approximation. Real printing depends on paper, ink and an ICC color profile, so treat the result as a starting point and always check a proof for brand-critical colors.
HEX and CMYK explained
What is HEX?
A HEX code is a six-digit hexadecimal number that stores the red, green and blue channel of a color behind a leading #. Each pair of digits covers one channel, from 00 (none) to FF (full), which gives the same 16.7 million colors as RGB in a much shorter notation. HEX is the default in CSS, design tools and brand guidelines.
- Syntax:
- #RRGGBB
- Range:
- 00–FF per channel
- Best for:
- CSS, design handoff, brand guidelines
What is CMYK?
CMYK is the four-ink model used in printing: cyan, magenta, yellow and key (black), each as a percentage from 0 to 100. Ink subtracts light instead of emitting it, so CMYK covers fewer colors than a screen — which is why bright screen colors often look duller once they are printed.
- Syntax:
- cmyk(C%, M%, Y%, K%)
- Range:
- 0–100% per ink
- Best for:
- print, packaging, press-ready artwork
HEX to CMYK reference table
The most common CSS colors, converted from HEX to CMYK.
| Color | HEX | CMYK |
|---|---|---|
| black | #000000 | cmyk(0%, 0%, 0%, 100%) |
| white | #FFFFFF | cmyk(0%, 0%, 0%, 0%) |
| red | #FF0000 | cmyk(0%, 100%, 100%, 0%) |
| lime | #00FF00 | cmyk(100%, 0%, 100%, 0%) |
| blue | #0000FF | cmyk(100%, 100%, 0%, 0%) |
| yellow | #FFFF00 | cmyk(0%, 0%, 100%, 0%) |
| orange | #FFA500 | cmyk(0%, 35%, 100%, 0%) |
| teal | #008080 | cmyk(100%, 0%, 0%, 50%) |
| purple | #800080 | cmyk(0%, 100%, 0%, 50%) |
| gray | #808080 | cmyk(0%, 0%, 0%, 50%) |