Coming from print and need the same color on the web? Converting CMYK to HEX gives you the closest screen equivalent of your ink mix, ready to paste into CSS, Figma or a brand sheet.
How CMYK to HEX conversion works
- Divide all four CMYK percentages by 100.
- Apply the key component first: every channel is scaled by (1 − K).
- Compute the channels: R = 255 × (1 − C) × (1 − K), G = 255 × (1 − M) × (1 − K), B = 255 × (1 − Y) × (1 − K).
- Round each channel, write it as two hexadecimal digits and join them behind a #.
Worked example
Approximate by nature. CMYK covers a smaller range of colors than a screen, so the HEX result is a faithful preview rather than a color-managed match — that would need the ICC profile of the press.
CMYK and HEX explained
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
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
CMYK to HEX reference table
The most common CSS colors, converted from CMYK to HEX.
| Color | CMYK | HEX |
|---|---|---|
| black | cmyk(0%, 0%, 0%, 100%) | #000000 |
| white | cmyk(0%, 0%, 0%, 0%) | #FFFFFF |
| red | cmyk(0%, 100%, 100%, 0%) | #FF0000 |
| lime | cmyk(100%, 0%, 100%, 0%) | #00FF00 |
| blue | cmyk(100%, 100%, 0%, 0%) | #0000FF |
| yellow | cmyk(0%, 0%, 100%, 0%) | #FFFF00 |
| orange | cmyk(0%, 35%, 100%, 0%) | #FFA600 |
| teal | cmyk(100%, 0%, 0%, 50%) | #008080 |
| purple | cmyk(0%, 100%, 0%, 50%) | #800080 |
| gray | cmyk(0%, 0%, 0%, 50%) | #808080 |