Format Code Now
/

RGB to CMYK Converter

CU-21

Type an RGB color such as rgb(255, 128, 0), 255 128 0 or #ff8000 and get CMYK percentages, in whole percent or one decimal. One color per line.

Runs in your browser. Nothing is uploaded.

RGB colors, one per line (rgb(255, 128, 0), 255 128 0 or #ff8000)

CMYK

How to use it

  1. Type or paste one color per line: rgb(255, 128, 0), 255 128 0 or a hex code.
  2. Choose whole percent or one decimal, and the output style.
  3. Press RGB to CMYK.
  4. Copy the result or download it as a text file.

The formula used

Black (K) is 1 minus the largest of red, green and blue, each divided by 255. Cyan, magenta and yellow are then (1 - channel - K) / (1 - K). Pure black comes out as 0, 0, 0, 100 and white as 0, 0, 0, 0. For rgb(255, 128, 0) the answer is cyan 0, magenta 50 (49.8 with one decimal), yellow 100, black 0.

Screen formula, not a print profile

This is the plain mathematical conversion. Print CMYK depends on the inks, the paper and an ICC profile, so a print shop or a color-managed app will often pick different values for the same screen color. Bright screen colors, such as pure blue, cannot be printed with ordinary inks at all. Use this tool for estimates and code, and the printer profile for press files.

Output styles

Choose cmyk(0%, 50%, 100%, 0%), plain numbers like 0, 50, 100, 0, or fractions from 0 to 1 such as 0, 0.5, 1, 0. Alpha in the input is ignored. Hex codes and rgb() both work as input, as do hsl(), hsv() and CSS color names.

Error messages and what to do

MessageWhat it meansFix
Line 1: "nope" is not a color. Use hex (#rgb, #rrggbb, #rrggbbaa), rgb(), hsl(), hsv(), cmyk() or a CSS color name.The line could not be read as a color.Write the color as hex, rgb(), hsl(), hsv(), cmyk() or a CSS color name.
Line 1: "1 2" has 2 values; RGB needs 3An RGB line needs exactly three values.Give red, green and blue, for example 255 128 0.

Questions people ask

How do I convert RGB to CMYK?

Divide each channel by 255, set K to 1 minus the largest one, then compute each of C, M and Y as (1 - channel - K) / (1 - K). Type your color and the tool does all of this, giving percentages.

What is the CMYK of rgb(255, 0, 0)?

It is cmyk(0%, 100%, 100%, 0%): no cyan, full magenta and yellow, no black. Pure green gives 100, 0, 100, 0 and pure blue gives 100, 100, 0, 0.

Why does my printer show different CMYK values?

Printers and apps such as Photoshop use ICC profiles that account for real inks and paper. This tool uses the plain formula without a profile, so its numbers are a starting estimate, not a proof.

Can I use a hex code as input?

Yes. #336699 returns cmyk(67%, 33%, 0%, 40%) in whole percent. Three-digit hex such as #369, rgb() values, hsl() values and CSS color names also work as input on this page.

What does the one-decimal option change?

It keeps one decimal place, so 49.8 instead of 50. The input is 8-bit, so there are only 256 steps per channel, and one decimal shows the small difference that whole percent hides.

Is CMYK the same as the colors printed on paper?

No. CMYK values only describe ink amounts. The color that appears depends on the printer, ink, paper and profile, which is why the same numbers can print differently on different presses.

About this tool

Uses the simple screen formula: black is 1 minus the largest of red, green and blue (each divided by 255), and cyan, magenta and yellow are what is left after removing that black. Pure black comes out as 0, 0, 0, 100. This is not an ICC-profiled conversion, so it will not match the CMYK a print shop or a color-managed app would pick for the same screen color; use it for quick estimates and for code that needs the plain formula. Hex and rgb() input both work, and one decimal gives finer values than whole percent. Alpha is ignored.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.