HEX to CMYK Converter

Convert an sRGB HEX color into a profile-free CMYK percentage estimate, with the reverse CMYK-to-HEX calculation available in the same tool.

Last updated: August 2026 | By Workshelve Team

CSS HEX uses sRGB

CSS six-digit HEX notation represents red, green, and blue channel values in the sRGB color space.

CMYK is print-oriented

This calculator returns a mathematical CMYK percentage estimate, not a printer- or press-profile conversion.

Profiles still matter

Real print appearance can change with the CMYK profile, ink set, paper, rendering intent, and output device.

What HEX to CMYK Conversion Actually Does

A CSS-style HEX color is an sRGB color written as three hexadecimal byte values: red, green, and blue. The calculator first expands three-digit shorthand such as #0F8 to #00FF88, then reads the three channel pairs as values from 0 through 255.

Those RGB channels are normalized to the 0–1 range. The black component is calculated first as K = 1 − max(R′, G′, B′). Cyan, magenta, and yellow are then calculated relative to the remaining non-black portion. Pure black is handled separately as C 0%, M 0%, Y 0%, K 100%.

The result is intentionally a profile-free arithmetic estimate. A production RGB-to-CMYK conversion normally uses color-management information for a specific output condition, so a print application can legitimately return different CMYK numbers for the same HEX color.

HEX to CMYK Formula

R′ = R / 255, G′ = G / 255, B′ = B / 255

K = 1 − max(R′, G′, B′)

C = (1 − R′ − K) / (1 − K)

M = (1 − G′ − K) / (1 − K)

Y = (1 − B′ − K) / (1 − K)

The calculator multiplies C, M, Y, and K by 100 to display percentages.

HEX to CMYK Examples

#FF0000
C 0% · M 100% · Y 100% · K 0%
#00AEEF
C 100% · M 27.196653% · Y 0% · K 6.27451%
#663399
C 33.333333% · M 66.666667% · Y 0% · K 40%
#000000
C 0% · M 0% · Y 0% · K 100%

Worked example: #06B6D4

HEX 06, B6, and D4 decode to RGB 6, 182, and 212. After normalization, K = 16.862745%. Applying the remaining three equations gives C = 97.169811%, M = 14.150943%, and Y = 0%.

#06B6D4 → C 97.169811% · M 14.150943% · Y 0% · K 16.862745%

HEX to CMYK FAQ

Why can Photoshop or a print provider give different CMYK values?

This calculator uses a profile-free mathematical estimate. Color-managed software can use a chosen RGB source profile, CMYK destination profile, rendering intent, and output condition, so different workflows can produce different CMYK separations.

Does this accept three-digit HEX colors?

Yes. Three-digit shorthand is expanded before conversion: #0F8 becomes #00FF88. Six-digit HEX is also accepted with #, with a leading 0x, or with no prefix.

Why is black treated as a special case?

For RGB black, R′, G′, and B′ are all zero, so K becomes 1. The C, M, and Y equations would otherwise divide by 1 − K, which is zero. The calculator returns 0%, 0%, 0%, 100% for that case.

Can I use these CMYK numbers as a press-ready color specification?

Use them as a numerical reference, not as a guaranteed press match. Press-ready work should follow the color profile and production requirements supplied by the printer or publishing workflow.

Why does the calculator show decimal percentages?

Many HEX colors do not map to whole-number CMYK percentages under this formula. Results are rounded to six decimal places so the calculation stays consistent without hiding those fractional values.

Related Tools