HEX to CMYK Converter
Convert HEX web colors to CMYK print colors. CMYK (Cyan, Magenta, Yellow, Key/Black) is the standard color model for professional printing, and converting from HEX ensures your digital colors translate accurately to print.
Understanding CMYK
CMYK is a subtractive color model used in printing:
- C: Cyan (0-100%)
- M: Magenta (0-100%)
- Y: Yellow (0-100%)
- K: Key/Black (0-100%)
Why Convert to CMYK?
| Scenario | Reason |
|---|---|
| Print design | Printers use CMYK ink |
| Business cards | Professional printing |
| Marketing materials | Brochures, flyers |
| Packaging | Product labels |
HEX to CMYK Examples
| Color | HEX | CMYK |
|---|---|---|
| Red | #FF0000 | C:0 M:100 Y:100 K:0 |
| Blue | #0000FF | C:100 M:100 Y:0 K:0 |
| Green | #00FF00 | C:100 M:0 Y:100 K:0 |
| Black | #000000 | C:0 M:0 Y:0 K:100 |
| White | #FFFFFF | C:0 M:0 Y:0 K:0 |
Color Gamut Warning
Not all RGB colors can be reproduced in CMYK. Vibrant blues and greens may appear duller in print. Always proof your colors before final printing.
Use this converter when preparing digital designs for professional printing.
HEX and CMYK
| HEX | CMYK | |
|---|---|---|
| Syntax | #RRGGBB, or #RGB shorthand, or #RRGGBBAA with alpha | cmyk(0%, 61%, 72%, 0%) β not valid CSS |
| Channels | red, green, blue β each 0β255 written as two hex digits | cyan, magenta, yellow, key (black), each 0β100% |
| Precision | 8 bits per channel, 16.7 million colours | Depends entirely on the ICC profile and the press |
| Support | Universal. The 8-digit alpha form needs a 2020-or-later browser. | Print only. Browsers have no CMYK colour type. |
| Best for | Design handoff, CSS, anywhere a colour is written as a single token. | Print production. Always confirm against the printerβs own profile. |
A Worked Example
Taking CSS tomato through every format:
| Format | Value |
|---|---|
| HEX | #FF6347 |
| RGB | rgb(255, 99, 71) |
| RGBA | rgba(255, 99, 71, 0.5) |
| HSL | hsl(9, 100%, 64%) |
| HSB | hsb(9, 72%, 100%) |
| CMYK | cmyk(0%, 61%, 72%, 0%) |
What Gets Lost
RGB and CMYK do not cover the same gamut. Saturated screen colours β bright greens and oranges especially β have no CMYK equivalent and will come back duller in print. Treat the numbers below as a starting point and proof against the press profile.
Doing It in Code
``javascript
// HEX to RGB
const hexToRgb = (hex) => {
const n = parseInt(hex.replace('#', ''), 16);
return { r: (n >> 16) & 255, g: (n >> 8) & 255, b: n & 255 };
};
// RGB to HEX
const rgbToHex = (r, g, b) =>
'#' + [r, g, b].map((v) => v.toString(16).padStart(2, '0')).join('');
`
Modern CSS can do a lot of this without any conversion at all: color-mix() blends two
colours, and relative colour syntax β hsl(from var(--brand) h s calc(l + 10%))` β derives
a lighter shade without you ever computing one.