Blog
Unit converters

HEX to CMYK converter

Enter a HEX color code (e.g. #3B82F6), and the converter computes approximate cyan, magenta, yellow and black (CMYK) percentages for four-color printing.

Result

Cyan (C) —
Magenta (M) —
Yellow (Y) —
Black (K) —
CMYK string —

All calculations run locally in your browser: parsing, chart, export. Disconnect the network and the page keeps working.

Facts and limits of this method

Supported formats 3-digit (#RGB) and 6-digit (#RRGGBB) HEX
Intermediate step HEX is first converted to RGB, then to CMYK
Output range C, M, Y, K from 0% to 100%
Letter case Uppercase and lowercase A–F are equivalent

When it misleads you

How it is calculated

The HEX code is parsed into three channels — red, green and blue, each from 0 to 255 (a shorthand 3-digit code is first expanded to 6 digits).

R, G, B values are normalized by dividing by 255, giving numbers from 0 to 1.

The black channel K is computed as one minus the maximum of the normalized R, G, B.

Each of cyan, magenta and yellow is computed as (1 − channel − K) / (1 − K), and the result is multiplied by 100 to give CMYK percentages.

Questions and answers

Why does the color look different on screen than printed?

A screen shows light (RGB/HEX), while paper shows reflected light after ink is applied (CMYK), so the final printed shade should always be checked with a proof.

Can I enter HEX without the # symbol?

Yes, the # is optional — the converter understands the code with or without it.

Does shorthand 3-digit HEX work?

Yes, the converter automatically expands it to the full 6-digit form before calculating.

Is my data sent anywhere?

No, the whole calculation runs in your browser.

Related tools

All tools