HEX to CMYK

Convert HEX colors to CMYK as you type, with a live preview, the formula and a table of common colors converted.

loading HEX to CMYK
About this tool

What are HEX and CMYK?

HEX writes the red, green and blue channels of sRGB as two hexadecimal digits each, from 00 to FF. CMYK gives the share of cyan, magenta, yellow and black ink. The values here come from the simple formula over sRGB; a print shop converts with an ICC profile of its press and paper (FOGRA39, GRACoL, SWOP), so its numbers may differ.

The quick way to put a web brand color into a print quote; for packaging or brand-critical prints, match a Pantone or proof with the printer.

The color converter below starts from HEX and highlights CMYK, next to HWB, LAB, LCH and CSS names.

HEX vs CMYK

HEXCMYK
Notation#RRGGBB, #RGB, #RRGGBBAAcmyk(0%, 30%, 86%, 0%)
In CSSall browsersnot in browsers (print only)
Typical useCSS, design handoff, brand guidesprint briefs, packaging, quotes from print shops

Formula

Split the six digits in pairs and read each pair as a base-16 number: FF = 15 × 16 + 15 = 255, B2 = 11 × 16 + 2 = 178, 24 = 2 × 16 + 4 = 36, so #FFB224 is rgb(255, 178, 36). A three-digit HEX doubles each digit (#F80 = #FF8800). Then: With channels scaled to 0–1: K = 1 − max(R, G, B); C = (1 − R − K) / (1 − K), and the same for M with G and Y with B. Back to RGB: R = 255 × (1 − C) × (1 − K). This is the device-independent formula; print shops use ICC profiles.

What changes in the conversion

  • The conversion is not perfectly reversible: CMYK values are rounded to whole percents, and the simple formula ignores paper and ink.
  • Transparency (alpha) is kept: #RRGGBBAA, rgb(… / 0.5), hsl(… / 50%) and oklch(… / 0.5) all carry it.

How to convert HEX to CMYK

  1. Type or paste the HEX value in its line, or pick a color with the color picker.
  2. Read the CMYK line, which updates as you type, and check the preview swatch.

Common colors from HEX to CMYK

Converted with the same code as the tool:

ColorHEXCMYK
amber (stdlib.tools accent)#FFB224cmyk(0%, 30%, 86%, 0%)
teal#0B7285cmyk(92%, 14%, 0%, 48%)
blue#3B82F6cmyk(76%, 47%, 0%, 4%)
green#16A34Acmyk(87%, 0%, 55%, 36%)
red#DC2626cmyk(0%, 83%, 83%, 14%)
mid gray#808080cmyk(0%, 0%, 0%, 50%)
black#000000cmyk(0%, 0%, 0%, 100%)
white#FFFFFFcmyk(0%, 0%, 0%, 0%)

Frequently asked questions

Is HEX to CMYK exact?

Close, not exact: rounding and gamut limits apply, as explained above. For brand colors, keep the official value of each format instead of converting back and forth.

Why does the printed color look different from the screen?

A screen emits light in RGB and paper reflects it through ink, so very bright blues, greens and oranges of a screen cannot be printed. Ask the print shop for a proof or a Pantone reference when the color matters.

How do I write CMYK with transparency?

CMYK has no transparency: ink is either printed or not. Opacity is handled by the layout software before printing.

Report a problem