By · Updated

RGB to CMYK Converter

Hex and RGB to CMYK Percentages and Back

No ratings yet
Result

—

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the RGB To CMYK works

This rgb to cmyk converter turns a hex code or an RGB colour into cyan, magenta, yellow and black percentages for print. Switch the direction to turn CMYK values back into RGB and hex. Type a hex code such as #FF6600, or three numbers from 0 to 255 separated by commas; for CMYK, type four percentages.

Screens make colour by adding red, green and blue light, while printers lay down cyan, magenta, yellow and black ink that absorb light. Designers need both: a brand colour picked on screen has to become ink values for a business card or a leaflet. This converter gives the standard mathematical conversion, a good starting point before a printer's colour profile is applied.

How the rgb to cmyk conversion works

The formula first scales each RGB value to 0 to 1 by dividing by 255. Black is K = 1 − max(R, G, B). Each colour ink is then C = (1 − R − K) ÷ (1 − K), and the same for M with G and Y with B. Going the other way, R = 255 × (1 − C) × (1 − K), and likewise for G and B. Pure black, where K is 1, gives C, M and Y of zero.

First example. Orange #FF6600 is RGB 255, 102, 0. The largest value is 1, so K = 0. Cyan is 0, magenta is 1 − 0.4 = 60% and yellow is 100%. The result is C 0% · M 60% · Y 100% · K 0%, a total ink of 160%.

Second example. CMYK 100, 0, 0, 0, pure process cyan, converts back to rgb(0, 255, 255), which is #00FFFF.

How many colours survive the trip? Not all of them. Bright screen colours such as pure RGB green or electric blue sit outside what CMYK ink can print, so they come out duller on paper whatever numbers you use.

Common screen colours in hex and RGB with their basic CMYK equivalents

Colour Hex RGB CMYK (%)
White #FFFFFF 255, 255, 255 0, 0, 0, 0
Black #000000 0, 0, 0 0, 0, 0, 100
Red #FF0000 255, 0, 0 0, 100, 100, 0
Green #00FF00 0, 255, 0 100, 0, 100, 0
Blue #0000FF 0, 0, 255 100, 100, 0, 0
Cyan #00FFFF 0, 255, 255 100, 0, 0, 0
Magenta #FF00FF 255, 0, 255 0, 100, 0, 0
Yellow #FFFF00 255, 255, 0 0, 0, 100, 0
Orange #FFA500 255, 165, 0 0, 35, 100, 0
Purple #800080 128, 0, 128 0, 100, 0, 50
Pink #FFC0CB 255, 192, 203 0, 25, 20, 0
Brown #8B4513 139, 69, 19 0, 50, 86, 45
Grey #808080 128, 128, 128 0, 0, 0, 50
Light grey #D3D3D3 211, 211, 211 0, 0, 0, 17
Dark grey #333333 51, 51, 51 0, 0, 0, 80
Navy #000080 0, 0, 128 100, 100, 0, 50
Teal #008080 0, 128, 128 100, 0, 0, 50
Olive #808000 128, 128, 0 0, 0, 100, 50
Maroon #800000 128, 0, 0 0, 100, 100, 50
Gold #FFD700 255, 215, 0 0, 16, 100, 0
Sky blue #87CEEB 135, 206, 235 43, 12, 0, 8
Forest green #228B22 34, 139, 34 76, 0, 76, 45
Coral #FF7F50 255, 127, 80 0, 50, 69, 0
Lavender #E6E6FA 230, 230, 250 8, 8, 0, 2

Tips and pitfalls

FAQ

How do I convert RGB to CMYK?

Divide each RGB value by 255. Black is 1 minus the largest of the three. Each of cyan, magenta and yellow is 1 minus its matching RGB value minus black, divided by 1 minus black. Multiply by 100 for percentages.

Why does my colour look different in print?

Ink on paper cannot reach the brightest screen colours, and paper, press and profile all shift the result. Ask the printer for a proof, and choose brand colours that sit inside the CMYK range from the start.

What is the CMYK for pure black?

Plain black #000000 converts to C 0 M 0 Y 0 K 100. For large solid areas many printers suggest a rich black such as C 60 M 40 Y 40 K 100, which looks deeper on paper.

Is CMYK the same as Pantone?

No. Pantone spot colours are premixed inks printed as a single colour, which can reach shades CMYK cannot. Many Pantone guides list a CMYK equivalent, but it is an approximation that often looks slightly different.

Can I enter CMYK as decimals?

Enter percentages from 0 to 100, separated by commas, such as 0, 60, 100, 0. The converter rounds the resulting RGB values to whole numbers from 0 to 255 and shows the hex code too.

See also: all Units tools, Images, Audio & Video, Documents, Data & Code.

Related tools