How to Convert CMYK to RGB (With the Exact Formula)
Color Code5 min read
Screens mix light; printers mix ink. That single difference is why a file can look right on your monitor and muddy on paper, and why CMYK and RGB codes exist. Converting between the two is a bit of arithmetic — the caveats come after the math.
The CMYK to RGB formula
CMYK describes ink coverage as four percentages, written as decimals in the math below:
- C — cyan
- M — magenta
- Y — yellow
- K — key (black)
To get the screen value, subtract each ink from white and then multiply through by the amount of black that is not present:
R = 255 × (1 − C) × (1 − K)
G = 255 × (1 − M) × (1 − K)
B = 255 × (1 − Y) × (1 − K)The (1 − K) factor is the important part. Black ink darkens everything on the page, so it scales all three channels at once.
Worked example 1: a print red
Take CMYK(0%, 85%, 75%, 15%) — a warm red with a little black in it:
R = 255 × (1 − 0) × (1 − 0.15) = 216.75→ 217G = 255 × (1 − 0.85) × (1 − 0.15) = 32.51→ 33B = 255 × (1 − 0.75) × (1 − 0.15) = 54.19→ 54
Rounded, that is rgb(217, 33, 54) or #D92136.
Worked example 2: a process blue
CMYK(100%, 50%, 0%, 0%):
R = 255 × (1 − 1) × 1 = 0G = 255 × (1 − 0.5) × 1 = 127.5→ 128B = 255 × (1 − 0) × 1 = 255
That gives #0080FF — a saturated blue that is nearly impossible for CMYK inks to reproduce on paper, which is exactly why bright screen blues are the classic print surprise.
Converting RGB back to CMYK
The reverse conversion normalizes each channel, finds the black that is left over, and then works out the other inks:
K = 1 − max(R, G, B) / 255
C = (1 − R/255 − K) / (1 − K)
M = (1 − G/255 − K) / (1 − K)
Y = (1 − B/255 − K) / (1 − K)When K = 1 (pure black) the divisions have nothing left to work with, so C, M and Y are simply 0.
Crimson #DC143C is rgb(220, 20, 60):
K = 1 − 220/255 = 13.7%M = (1 − 20/255 − 0.137) / (1 − 0.137) = 90.9%Y = (1 − 60/255 − 0.137) / (1 − 0.137) = 72.7%C = (1 − 220/255 − 0.137) / (1 − 0.137) = 0%
So the code is CMYK(0%, 91%, 73%, 14%) — a red built almost entirely from magenta and yellow, which is what makes a clean red on press.
A quick reference table
| Color | Hex | RGB | CMYK |
|---|---|---|---|
| Navy | #000080 | rgb(0, 0, 128) | 100 / 100 / 0 / 50 |
| Maroon | #800000 | rgb(128, 0, 0) | 0 / 100 / 100 / 50 |
| Gold | #FFD700 | rgb(255, 215, 0) | 0 / 16 / 100 / 0 |
| Crimson | #DC143C | rgb(220, 20, 60) | 0 / 91 / 73 / 14 |
| White | #FFFFFF | rgb(255, 255, 255) | 0 / 0 / 0 / 0 |
| Black | #000000 | rgb(0, 0, 0) | 0 / 0 / 0 / 100 |
Notice the pattern: pure inks produce pure channels, and any black ink immediately pulls all three RGB values down.
The catch: gamut, not arithmetic
The formulas above are naive conversions, and every design tool offers them. They are fine for mock-ups and web assets, but they are not a color-managed print conversion:
- The two models do not share a gamut. sRGB contains bright cyans, greens and blues that no CMYK ink set can print; CMYK contains some deep, dense colors that sRGB renders as a flat muddy tone.
- Real conversion needs ICC profiles. Photoshop, Affinity and InDesign convert through a press profile (for example Coated FOGRA39 or U.S. Web Coated SWOP) plus a rendering intent, which maps out-of-gamut colors deliberately instead of clipping them channel by channel.
- Black is not just black.
K = 100%prints as a slightly gray, flat black, so designers use a rich black — black plus support inks, commonly aroundC 60 / M 40 / Y 40 / K 100— for large solid areas, while keeping100% Kfor body text so it stays crisp. - Paper and ink change everything. Coated stock, uncoated stock, newsprint and a home inkjet all render the same CMYK numbers differently. That is why a proof exists.
For the web, remember that you ship RGB, never CMYK. CSS Color Level 4 does define a device-cmyk() function, but browser support is limited, so practical web code stays in hex, RGB or HSL.
Which direction do you need?
- Designing for print? Start in RGB or hex for the screen, then convert to CMYK through your press profile at the end — and ask the printer which profile they want.
- Got CMYK values from a printer or a brand guide? Convert them to RGB only for on-screen mock-ups and thumbnails, and note that the result is an approximation.
- Just need a number fast? The CMYK to RGB converter takes four percentages and returns a hex code instantly, and the RGB to CMYK converter goes the other way, both showing the values side by side.
Try it: enterCMYK(100%, 50%, 0%, 0%)in the CMYK to RGB converter and check the result against#0080FF. Then run that hex code back through the RGB to CMYK converter — the numbers will land close to where you started, though rounding means they rarely match exactly.
Treat the formulas as translation, not simulation. They tell you what a color code means in the other model; only a press profile can tell you what a printer will actually put on paper.
Tools for this guide
Related posts
RGB vs CMYK: What's the Difference and When to Use Each
RGB and CMYK describe color in two completely different ways — light versus ink. Here is when to use each, why screens look brighter than print, and how to convert values.
How to Convert RGB to Hex (and Back Again)
RGB and hex are two ways of writing the same color. Here is exactly how to convert between them by hand, why the math works, and the fastest way to do it online.