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
| RGB | CMYK | |
|---|---|---|
| Notation | rgb(255 178 36), rgb(255, 178, 36) | cmyk(0%, 30%, 86%, 0%) |
| In CSS | all browsers | not in browsers (print only) |
| Typical use | code that computes colors, canvas, image libraries | print 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%)andoklch(… / 0.5)all carry it.
How to convert RGB to CMYK
- Type or paste the RGB value in its line, or pick a color with the color picker.
- 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:
| Color | RGB | CMYK |
|---|---|---|
| amber (stdlib.tools accent) | rgb(255, 178, 36) | cmyk(0%, 30%, 86%, 0%) |
| teal | rgb(11, 114, 133) | cmyk(92%, 14%, 0%, 48%) |
| blue | rgb(59, 130, 246) | cmyk(76%, 47%, 0%, 4%) |
| green | rgb(22, 163, 74) | cmyk(87%, 0%, 55%, 36%) |
| red | rgb(220, 38, 38) | cmyk(0%, 83%, 83%, 14%) |
| mid gray | rgb(128, 128, 128) | cmyk(0%, 0%, 0%, 50%) |
| black | rgb(0, 0, 0) | cmyk(0%, 0%, 0%, 100%) |
| white | rgb(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.