ColorSwatches.org

Hex ↔ CMYK Converter

Convert directly between a CSS hex color code and CMYK print values (Cyan, Magenta, Yellow, Key/Black). This is a device-independent mathematical conversion — actual print results depend on your ink profile and paper stock.

Hex Color
CMYK
#3A7BD5
cmyk(73%, 43%, 0%, 16%)

Sponsors

About Hex ↔ CMYK Conversion

Hex color codes are a compact six-digit hexadecimal representation of RGB values — the format used in CSS, HTML, and most digital design tools. CMYK is a subtractive model used in offset and digital print, where colors are produced by combining Cyan, Magenta, Yellow, and Key (Black) inks. The two systems are mathematically related through RGB as an intermediate step: hex is decoded to RGB values, then RGB is scaled to CMYK percentages.

Hex to CMYK Formula

Step 1 — decode hex to R, G, B (each 0–255), then normalize: \( r' = R/255, \; g' = G/255, \; b' = B/255 \).

Step 2 — calculate Key:

\[ K = 1 - \max(r', g', b') \]

Step 3 — if \( K = 1 \) (pure black), \( C = M = Y = 0 \). Otherwise:

\[ C = \frac{1 - r' - K}{1 - K}, \quad M = \frac{1 - g' - K}{1 - K}, \quad Y = \frac{1 - b' - K}{1 - K} \]

CMYK to Hex Formula

Reverse: compute RGB then encode each channel as a two-digit hex pair.

\[ R = 255 \times (1 - C)(1 - K), \quad G = 255 \times (1 - M)(1 - K), \quad B = 255 \times (1 - Y)(1 - K) \]

Then: \( \text{hex} = \texttt{\#}\,\text{RR}\,\text{GG}\,\text{BB} \) where each byte is zero-padded to two uppercase hex digits.

Gamut and Profile Differences

CMYK has a smaller color gamut than sRGB — vivid neon or electric colors that exist in hex/RGB may fall outside what standard process inks can reproduce. This calculator uses a device-independent formula. For professional print work, convert using ICC profiles in Photoshop or Illustrator and consult your printer's color specifications.


Frequently Asked Questions

Why does this give different values than Photoshop?

Photoshop applies an ICC color profile (e.g., U.S. Web Coated SWOP v2) that adjusts colors for specific ink-paper combinations. This calculator uses the device-independent mathematical formula — a good starting approximation, but not a substitute for profile-based conversion in a professional print workflow.

Can I use a hex color directly in a print file?

Not directly. Print files need CMYK (or spot colors). Use this converter to get the CMYK equivalent, then verify with your print provider. Some digital printers can accept RGB or hex values, but offset printing requires CMYK separation.

Why is there a separate K (black) channel?

Equal parts of cyan, magenta, and yellow should theoretically produce black, but in practice they produce a muddy dark brown due to ink absorption variance. A dedicated black (K) plate gives crisper text, richer shadows, and uses less colored ink — reducing cost and drying time.

What does the hex prefix "#" stand for?

The hash symbol is a convention from early computing that signals the following characters are a hexadecimal value, not a word or decimal number. In CSS it tells the browser to interpret the next six characters as a pair each for red, green, and blue channels in base-16.

More Color Tools

Browse all tools →