HEX to CMYK Converter
#C0392B
A formula CMYK value is not a press-ready separation. Print work converts colour through an ICC profile made for one set of inks, paper and press, such as a FOGRA39 coated-paper profile, so a printer's or design app's CMYK for the same colour can differ. Converting the result back can also miss the starting code by a step or two in a pair, because each ink is rounded to a whole percentage.
Going the other way? Convert CMYK inks back to a hex code →
How do I convert hex codes to CMYK values?
A hex colour code becomes four ink percentages in two moves: #C0392B is cmyk(0%, 70%, 78%, 25%). Read the three pairs as channel values, then apply the RGB to CMYK formula to those values.
- Type or paste the code. The leading # is optional, either case reads, and the three-digit form is expanded first.
- Read each pair as a channel value from 0 to 255: C0 is 192, 39 is 57 and 2B is 43.
- Work out black from the largest channel: (255 − 192) ÷ 255 is 0.24705…, which rounds to 25%.
- Measure each other ink against that largest channel, (192 − 57) ÷ 192 for magenta, then round every ink to a whole percentage.
- Copy the result, or swap the direction to turn the inks back into a hex code.
A hex code names a screen colour, so its ink percentages are an estimate; the RGB vs CMYK for print guide explains what a printer does with them.
Grey Hex Codes and Their CMYK Formula Results
Greys make the black ink visible on its own. Each code below has three equal pairs, so cyan, magenta and yellow stay at 0 and only K moves as the grey darkens, from 0% at white to 100% at black.
| Hex code | CMYK |
|---|---|
| #FFFFFF | cmyk(0%, 0%, 0%, 0%) |
| #CCCCCC | cmyk(0%, 0%, 0%, 20%) |
| #999999 | cmyk(0%, 0%, 0%, 40%) |
| #666666 | cmyk(0%, 0%, 0%, 60%) |
| #333333 | cmyk(0%, 0%, 0%, 80%) |
| #000000 | cmyk(0%, 0%, 0%, 100%) |
Worked Example: #C0392B to CMYK
#C0392B has three different pairs and a largest pair below FF, so every step of the formula does some work. The working reads each pair as a channel, then gives each ink, with the colour painted beside it.
#C0392B
Result: #C0392B = cmyk(0%, 70%, 78%, 25%)
The four inks give cmyk(0%, 70%, 78%, 25%). Sent back through the inverse formula it returns #BF392A, not #C0392B, because each ink was rounded to a whole percentage.
- #C0392B as CMYK inks: cmyk(0%, 70%, 78%, 25%)
Check it in reverse
To check the result, write the inks back as a hex code; expect the numbers to come back close, not always identical.
Worked examples: HEX to CMYK
Each example gives the value first, then the working. Select a value to load it in the converter.
What is #C0392B in CMYK?
#C0392B comes out as cmyk(0%, 70%, 78%, 25%).
Pairs first: C0 = 192, 39 = 57, 2B = 43. Black is 25%; magenta 70% and yellow 78% are measured against 192.
What is #808080 in CMYK?
#808080 comes out as cmyk(0%, 0%, 0%, 50%).
Every pair is 80 = 128, so cyan, magenta and yellow are 0% and black is 0.49803…, which rounds to 50%.
Every example above converts back through the inverse formula — run the same inks back into a hex code — though rounding each ink to a whole percentage can move a value by a step or two.
What the Hex Code Becomes
Below are the rules this page follows, in the wording the site uses everywhere. The formula is stated in full, and the page applies it to the channel values the pairs give.
The formula puts every grey on the black ink alone: when red, green and blue are equal, C, M and Y are 0 and only K changes, so #333333 is cmyk(0%, 0%, 0%, 80%).
Profile-based software also decides how much black ink replaces cyan, magenta and yellow, and there is no agreed measure for that choice, so two apps can give two CMYK values for one hex code.
iToolHub reads the hex colour code as three channels first, so a hex code and its rgb() value give the same CMYK; an alpha pair is read and named but not written.
To convert RGB to CMYK by formula, divide each channel by 255 to get R′, G′ and B′; then K = 1 − max(R′, G′, B′), C = (1 − R′ − K) / (1 − K), M = (1 − G′ − K) / (1 − K) and Y = (1 − B′ − K) / (1 − K). When K is 1, pure black, C, M and Y are 0.
Why Can One Hex Code Have Several CMYK Values?
Black Generation
Profile-based software also decides how much black ink replaces cyan, magenta and yellow, and there is no agreed measure for that choice, so two apps can give two CMYK values for one hex code. The formula makes one fixed choice, as much black as the colour allows, so its answer is the same on every device.
Greys Go to Black
The formula puts every grey on the black ink alone: when red, green and blue are equal, C, M and Y are 0 and only K changes, so #333333 is cmyk(0%, 0%, 0%, 80%). A profile conversion can build the same grey from all four inks.
The Alpha Pair
A four- or eight-digit code carries an alpha channel. Ink percentages have no place for it, so the page reads the alpha, names it under the result and leaves it out of the CMYK.
Common Mistakes
- Pasting a hexadecimal number that is not a colour code. A value marked 0x is one number, not three channels, and the page refuses it by name.
- Expecting design software to agree with the formula. It converts through a profile with its own black setting, so its value answers a different question.
- Treating 0% cyan, magenta and yellow on a grey as an error. Equal channels always give K alone in this formula.
- Leaving a digit off. Five and seven digits are not colour codes, and the page names the counts it reads.
Frequently Asked Questions
Why do different apps give different CMYK values for the same hex code?
Profile-based software also decides how much black ink replaces cyan, magenta and yellow, and there is no agreed measure for that choice, so two apps can give two CMYK values for one hex code. Each app also converts through its own profile.
Why does a grey hex code turn into black ink only?
Because the formula takes black from the largest channel and measures the other inks against it. In a grey the three channels are equal, so cyan, magenta and yellow all measure 0 and the whole colour lands on K.
Can I get RGB and CMYK from one hex code?
Yes, and this page shows both: the working reads each pair as a channel value before the formula runs, so the channels sit in the working and the inks in the result. Converting those inks back can land a step or two away from the code.
Yes, in the CMYK to HEX direction, though the code that comes back can differ slightly from yours.
Related Conversions
The rest of the family sits on every colour converter on the site.