HEX to CMYK
Paste a hex code and get an approximate CMYK value. For print, confirm with your printer's color profile.
How HEX to CMYK works
Scale RGB to 0–1. Black K = 1 − max(R, G, B). Then C = (1 − R − K) / (1 − K), and the same for M with G and Y with B.
#9CAF88 → K = 31%, C = 11%, M = 0%, Y = 22%. Result: cmyk(11%, 0%, 22%, 31%).
This is a device-independent approximation. Real presses use ICC profiles, so printed results vary.
HEX to CMYK: worked examples
Eight reference colors, converted by the same formulas as the tool above.
| Color | HEX | CMYK | Back to HEX |
|---|---|---|---|
| Red | #FF0000 | cmyk(0%, 100%, 100%, 0%) | #FF0000 |
| Black | #000000 | cmyk(0%, 0%, 0%, 100%) | #000000 |
| White | #FFFFFF | cmyk(0%, 0%, 0%, 0%) | #FFFFFF |
| Gray | #808080 | cmyk(0%, 0%, 0%, 50%) | #808080 |
| Dodger blue | #1E90FF | cmyk(88%, 44%, 0%, 0%) | #1F8FFF |
| Gold | #FFD700 | cmyk(0%, 16%, 100%, 0%) | #FFD600 |
| Sage | #9CAF88 | cmyk(11%, 0%, 22%, 31%) | #9DB089 |
| Vermilion | #F54927 | cmyk(0%, 70%, 84%, 4%) | #F54927 |
CMYK is written with rounded numbers, so converting back does not always return the original. In this table the biggest difference is 1 step in one channel, out of 255.
Things that trip people up
- This is a formula, not a press result. Pure
#FF0000becomescmyk(0%, 100%, 100%, 0%)here, but printed magenta plus yellow ink looks duller than a screen's red. A printer's ICC profile accounts for that. - CSS does not take
cmyk(). The color functions browsers support are hex,rgb(),hsl(),hwb(),lab(),lch(),oklab()andoklch(). Use CMYK values for print files, not stylesheets. - Black is one number.
#000000converts tocmyk(0%, 0%, 0%, 100%). Print shops often add cyan, magenta and yellow under black for a richer look; that is a print decision this formula does not make.
Related pages
Frequently asked questions
Is hex to CMYK exact?
No. Screens and presses produce color differently. This formula is a starting point; your printer's ICC profile gives the real values.
Why does K matter?
K (black) replaces equal amounts of cyan, magenta and yellow, which saves ink and prints cleaner darks.
Other converters
Color Picker →
Pick visually, get every code.
Converter →
HEX, RGB, HSL, OKLCH, CMYK.
Contrast Checker →
WCAG 2.2 AA and AAA, with fixes.
Color Blindness →
See colors as others do.
Named Colors →
All 148 CSS color names.
Color Wheel →
Harmonies on three wheels.
Palette Generator →
Lock, shuffle, check contrast.
Color Mixer →
Mix paint or light.
Tailwind Generator →
A 50 to 950 scale from one hex.
Content updated