Blog
Unit converters

CMYK to HEX converter

Enter cyan, magenta, yellow and black percentages (0–100%), and the converter computes the approximate screen HEX color code and shows a swatch.

Result

HEX code —
RGB 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

Intermediate step CMYK is first converted to RGB, then to HEX
Input range C, M, Y, K from 0% to 100%
Result format #RRGGBB — six hexadecimal digits
Result case Letters A–F are output uppercase

When it misleads you

How it is calculated

The C, M, Y and K percentages are converted to fractions from 0 to 1 by dividing by 100.

For each of R, G, B, the product (1 − color fraction) × (1 − black fraction) is computed, then multiplied by 255 and rounded to a whole number.

The resulting R, G, B numbers are converted to two-digit hexadecimal pairs.

The three pairs are joined in order with a leading "#" — producing a 6-digit HEX code.

Questions and answers

Why doesn't the on-screen color match what actually prints?

A screen shows light (RGB/HEX), while paper shows reflected light after ink is applied (CMYK); an exact match needs a profile for the specific printer and paper.

Can I use the result as a final design color?

Yes, as a guideline for interfaces and digital layouts — it's accurate enough for most everyday tasks.

Why does the code differ slightly after HEX→CMYK→HEX round-tripping?

Rounding of CMYK percentages and RGB byte values accumulates a small error at each step.

Is my data sent anywhere?

No, the whole calculation runs in your browser.

Related tools

All tools