RGB to CMYK

Convert RGB colors to CMYK as you type, with a live preview, the formula and a table of common colors converted.

loading RGB to CMYK
About this tool

What are RGB and CMYK?

RGB gives the same three sRGB channels as decimal numbers from 0 to 255, plus an optional alpha. 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.

Good for a first estimate of ink values for a print brief; ask the print shop for the final numbers, which come from their ICC profile.

The color converter below starts from RGB and highlights CMYK, next to HWB, LAB, LCH and CSS names.

RGB vs CMYK

RGBCMYK
Notationrgb(255 178 36), rgb(255, 178, 36)cmyk(0%, 30%, 86%, 0%)
In CSSall browsersnot in browsers (print only)
Typical usecode that computes colors, canvas, image librariesprint briefs, packaging, quotes from print shops

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.

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%) and oklch(… / 0.5) all carry it.

How to convert RGB to CMYK

  1. Type or paste the RGB value in its line, or pick a color with the color picker.
  2. Read the CMYK line, which updates as you type, and check the preview swatch.

Common colors from RGB to CMYK

Converted with the same code as the tool:

ColorRGBCMYK
amber (stdlib.tools accent)rgb(255, 178, 36)cmyk(0%, 30%, 86%, 0%)
tealrgb(11, 114, 133)cmyk(92%, 14%, 0%, 48%)
bluergb(59, 130, 246)cmyk(76%, 47%, 0%, 4%)
greenrgb(22, 163, 74)cmyk(87%, 0%, 55%, 36%)
redrgb(220, 38, 38)cmyk(0%, 83%, 83%, 14%)
mid grayrgb(128, 128, 128)cmyk(0%, 0%, 0%, 50%)
blackrgb(0, 0, 0)cmyk(0%, 0%, 0%, 100%)
whitergb(255, 255, 255)cmyk(0%, 0%, 0%, 0%)

Frequently asked questions

Is RGB to CMYK 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 CMYK with transparency?

CMYK has no transparency: ink is either printed or not. Opacity is handled by the layout software before printing.

Report a problem