What are CMYK and HEX?
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. HEX writes the red, green and blue channels of sRGB as two hexadecimal digits each, from 00 to FF.
For building a website from a printed brand manual that lists only CMYK; check the result against the brand’s official digital color if there is one.
The color converter below starts from CMYK and highlights HEX, next to HWB, LAB, LCH and CSS names.
CMYK vs HEX
| CMYK | HEX | |
|---|---|---|
| Notation | cmyk(0%, 30%, 86%, 0%) | #RRGGBB, #RGB, #RRGGBBAA |
| In CSS | not in browsers (print only) | all browsers |
| Typical use | print briefs, packaging, quotes from print shops | CSS, design handoff, brand guides |
Formula
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. Then: Write each channel (0–255) as two hexadecimal digits and join them: 255 → FF, 178 → B2 (178 = 11 × 16 + 2), 36 → 24, so rgb(255, 178, 36) is #FFB224. Values below 16 need a leading zero (10 → 0A).
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%)andoklch(… / 0.5)all carry it.
How to convert CMYK to HEX
- Type or paste the CMYK value in its line, or pick a color with the color picker.
- Read the HEX line, which updates as you type, and check the preview swatch.
Common colors from CMYK to HEX
Converted with the same code as the tool:
| Color | CMYK | HEX |
|---|---|---|
| amber (stdlib.tools accent) | cmyk(0%, 30%, 86%, 0%) | #FFB324 |
| teal | cmyk(92%, 14%, 0%, 48%) | #0B7285 |
| blue | cmyk(76%, 47%, 0%, 4%) | #3B82F5 |
| green | cmyk(87%, 0%, 55%, 36%) | #15A349 |
| red | cmyk(0%, 83%, 83%, 14%) | #DB2525 |
| mid gray | cmyk(0%, 0%, 0%, 50%) | #808080 |
| black | cmyk(0%, 0%, 0%, 100%) | #000000 |
| white | cmyk(0%, 0%, 0%, 0%) | #FFFFFF |
Frequently asked questions
Is CMYK to HEX 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 HEX with transparency?
Add two more digits for alpha: #FFB22480 is the amber at 50% opacity (80 hex = 128 of 255).