From your site's color code to four inks
Website colors are nearly always written in HEX: a hash sign followed by six hexadecimal digits, two for red, two for green, two for blue. It is a way of writing screen light. The day you need a flyer, a roll-up banner or packaging in the same colors, you are asked for CMYK, meaning percentages of cyan, magenta, yellow and black ink. If the printer gives you CMYK values instead, the CMYK to HEX converter goes the other way.
This HEX to CMYK converter works out those percentages from the code. It gives a first estimate, handy for a quote, a mockup or a conversation with the printer. No code at hand? The image color picker reads it from a screenshot of the site or from the logo. And to see the three channels behind the calculation, the HEX to RGB converter shows them.
How to proceed
- Paste the code into the field. The hash is optional, capitals are accepted, and so is the three-digit short form:
#f60is read as#ff6600. - The CMYK line fills in as soon as the code is complete, for example
cmyk(0%, 60%, 100%, 0%). The calculation stays in your browser. - Copy the value with one click. The RGB and HSL forms are shown alongside.
How the code is converted
Take the blue #2e86c1. First read the three pairs in base 16: 2e = 2 × 16 + 14 = 46, 86 = 8 × 16 + 6 = 134, c1 = 12 × 16 + 1 = 193. The largest value, 193, sets the black: K = 1 − 193 / 255 = 0.243, so 24%. Each ink is then (193 − value) / 193:
- cyan: (193 − 46) / 193 = 0.762, so 76%
- magenta: (193 − 134) / 193 = 0.306, so 31%
- yellow: (193 − 193) / 193 = 0%
Result: cmyk(76%, 31%, 0%, 24%).
| Color | HEX | CMYK |
|---|---|---|
| Red | #ff0000 | cmyk(0%, 100%, 100%, 0%) |
| Green | #00ff00 | cmyk(100%, 0%, 100%, 0%) |
| Yellow | #ffff00 | cmyk(0%, 0%, 100%, 0%) |
| Purple | #800080 | cmyk(0%, 100%, 0%, 50%) |
| Amethyst | #8e44ad | cmyk(18%, 61%, 0%, 32%) |
| Gray | #808080 | cmyk(0%, 0%, 0%, 50%) |
Good to know before printing: these figures come from a formula, not from a measurement. A print shop converts with an ICC profile matched to its press and paper (SWOP or FOGRA39, for example) and often gets different percentages. Some screen shades, such as #00ff00, are also beyond what inks can do: paper will show them less luminous. For a print run, ask the printer for the profile instead of copying these values.
Frequently asked questions
Why does #000000 give 0, 0, 0, 100?
With no light at all, K reaches 100% and the formula has no use for the other three inks. The result is a pure black. A rich black, which lays other inks under the black to make it denser, is something to settle with the printer.
I converted the CMYK back to HEX and the code changed. Is that normal?
Yes. Percentages are rounded to whole numbers, which costs a little precision. #2e86c1 gives cmyk(76%, 31%, 0%, 24%), which turns back into #2f86c2: one step off on red and blue, invisible to the eye.
Are eight-digit codes with transparency accepted?
No. The field expects three or six hexadecimal digits. Transparency has no equivalent in ink percentages.