Hex to CMYK Converter
WM-10Paste hex colors to get cyan, magenta, yellow and black percentages, or paste CMYK values to get hex. This uses the plain formula, not a print profile.
Runs in your browser. Nothing is uploaded.
Colors, one per line
Result
How to use it
- Paste one color per line: hex for Hex to CMYK, or cmyk() for CMYK to hex.
- Click Hex to CMYK or CMYK to hex.
- Tick Uppercase hex letters if you want #FF8800 style output.
- Copy the result or download it.
What this CMYK is, and is not
This page uses the simple formula. Black is 100 percent minus the largest of red, green and blue, and cyan, magenta and yellow are scaled from what remains. It makes pure black cmyk(0%, 0%, 0%, 100%). It is not an ICC-profiled conversion, which depends on the paper, ink and press. A printer or a color-managed app will often give different CMYK numbers for the same hex, so treat these as a starting point, not a press-ready value.
Whole percent, both ways
Output is whole percent, for example cmyk(0%, 47%, 100%, 0%) for #ff8800. Going back from CMYK applies the reverse formula and rounds to whole RGB numbers, so the round trip can be off by a step. In the CMYK to hex action, numbers are always read as percent, so 0.5 means half a percent, not 50. A plain list such as 0 100 100 0 works, with or without commas.
Privacy
The conversion runs in your browser. Your colors are not uploaded and no account is needed. Because the formula ignores profiles, two colors that look different on screen can end up with similar CMYK numbers, and the other way round. Check a printed proof before you commit to a color.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Line 1: cmyk() needs 4 values, but has 3 | cmyk() takes cyan, magenta, yellow and black, so four numbers. | Add the missing value. |
Line 2: "#12" has 2 hex digits; a hex color needs 3, 4, 6 or 8 | A hex code on that line has the wrong length. | Use 3, 4, 6 or 8 hex digits. |
Questions people ask
How do I convert hex to CMYK?
Convert the channels to 0 to 1, set black to 1 minus the largest channel, then each of cyan, magenta and yellow is (1 - channel - black) divided by (1 - black). The page does this and shows whole percent. #ff8800 gives 0, 47, 100, 0.
Will the CMYK match what my printer prints?
Not reliably. Real printing uses ink and paper profiles, and screen RGB colors often fall outside what ink can reproduce. This page uses the formula without a profile, so use it for rough values and check proofs for print work.
How do I convert CMYK to hex?
Choose CMYK to hex and paste cmyk(0%, 100%, 100%, 0%) or 0 100 100 0. The result is #ff0000. Each channel is 255 times the ink-free share, rounded to a whole number.
Why does black show 0, 0, 0, 100?
Pure black has no red, green or blue, so the black key is 100 percent and the other three inks are set to 0 by the formula. Some print workflows use a rich black with other inks added; this formula does not.
Is the CMYK percentage rounded?
Yes. Each of the four values is rounded to a whole percent. If you convert back you may get a hex code one or two steps from the original, because the percentages carry less precision than 8-bit RGB.
About this tool
CMYK here is the naive formula (it takes the largest RGB channel as the black key), not an ICC-profiled conversion, so it will not match what a printer or a color-managed app produces. Values are whole percent: from hex it computes the black key as 100 minus the largest channel percentage, then scales cyan, magenta and yellow from what is left. Pure black gives 0, 0, 0, 100. Going back from CMYK uses the reverse formula and rounds to whole RGB numbers. CMYK input can be cmyk(...) or a plain list of four percentages; numbers are always read as percent, so 0.5 means half a percent. The alpha channel is ignored. Any other color format works as input too: hex, rgb(), hsl(), hsv(), cmyk() or a CSS color name.