To turn CMYK percentages into an approximate screen color, the W3C naive conversion combines each color ink with black, inverts the result, and scales the values to 8-bit channels from 0 to 255 — yielding red, green, and blue numbers plus a six-digit hex code that mimics what that swatch might look like on a typical sRGB monitor. A practical way to run that conversion is the CMYK To RGB browser tool, which lets you enter four sliders for cyan, magenta, yellow, and black and immediately reads back the naive RGB channels, the hex code, and an on-screen swatch. The same formula has been documented in the W3C CSS Color Level 4 spec as the fallback for devices that cannot resolve an actual color profile, so the numbers you get match what an unprofiled CSS engine would produce.
People searching for "how to turn rgb to cmyk" usually have one of two goals. Some want a print recipe for a color they see on screen, so they need to leave RGB and arrive at CMYK percentages. Others hold a CMYK recipe from a printer or a brand guideline and want to see, before they commit to a layout, what that print swatch might look like on a monitor. Both jobs sit on the same conversion road, and the CMYK side of it — translating four inks back into three screen channels — is the more useful one to run in a quick browser preview because the answer can be read off and pasted into any on-screen design tool immediately.

What the conversion is actually doing
CMYK is a device-dependent, subtractive color model built around four inks — cyan, magenta, yellow, and black — laid down on paper. RGB is an additive, device-dependent color model built around three light sources — red, green, and blue — fired at a screen. Real conversions between them are bidirectionally lossy: every RGB color is not reproducible in CMYK, and every CMYK ink recipe is not reproducible on a given screen. The naive formula in this tool accepts that loss and proceeds anyway, producing a deterministic approximation that is good enough for layout work but not for press output.
For each of the three output channels, the tool folds the relevant CMY ink into the K channel, inverts, clamps to 0–1, and scales to 8-bit. In practice that means a higher CMYK percentage pulls the corresponding RGB channel down toward 0, and the K channel pulls all three down toward black at the same time. Stated as a formula for a single output channel, with values expressed from 0 to 1:
output = round(255 × (1 − min(1, ink × (1 − black) + black))), rounded with half-even tie-breaking for deterministic channel values.
| CMYK input (C / M / Y / K) | Naive RGB result | Hex |
|---|---|---|
| 0 / 0 / 0 / 0 (no ink) | 255, 255, 255 | #FFFFFF (white) |
| 0 / 0 / 0 / 100 (full black) | 0, 0, 0 | #000000 (black) |
| 0 / 100 / 100 / 0 (magenta + yellow) | 255, 0, 0 | #FF0000 (red) |
| 100 / 0 / 0 / 0 (full cyan) | 0, 255, 255 | #00FFFF (cyan) |
| 100 / 0 / 100 / 0 (cyan + yellow) | 0, 255, 0 | #00FF00 (green) |
The endpoint patterns match what every packaging and print designer expects intuitively: CMY are the three subtractive primaries whose RGB complements are the additive primaries, and K is a separate darkening channel that lowers all three output channels at once.
How to preview a CMYK recipe on screen
Open the CMYK To RGB tool in any modern browser. The page renders four range inputs side by side and three read-only display panels underneath. Move each slider until the percentage matches the recipe you want to evaluate. The display updates on every change, so you can iterate freely without clicking a "Convert" button. For a deeper walkthrough that mirrors these steps with screenshots, see the guide on converting CMYK to RGB for a screen preview in your browser.
- Drag the cyan slider from 0 to 100 percent until it matches the target value. The swatch and numeric readouts update on each step.
- Repeat for magenta, yellow, and black so all four sliders reflect the recipe you want to preview.
- Read the RGB channels panel for the resulting 8-bit red, green, and blue integers.
- Copy the hexadecimal value from the hex panel and paste it into a mockup, palette tool, or HTML page.
- Compare the rendered swatch against the original sample only as a sanity check — the result is an approximation, not a print proof.
If you only need a quick eyeball comparison, the rendered swatch gives the same approximate color you would see on a typical sRGB laptop display. If you need the numbers for reuse, the hex code is the shortest label that survives copy-paste between design tools.
Going the other way: from an RGB color back to CMYK
The reverse direction matters when a designer has locked a brand color in RGB and needs to hand a percentage recipe to a printer. The naive formula inverts cleanly only in the no-black case, so any real conversion involves a black-generation decision that a fallback approach cannot make for you. The companion RGB to CMYK converter produces a matching CMYK percentage set from any 8-bit RGB triplet. For broader context on which color space your project actually needs, the guide on whether to use CMYK or RGB for print projects walks through the trade-offs.
Even with a clean percent recipe in hand, the screen preview you get from this tool is not a substitute for a calibrated monitor. Two RGB values produced by this tool and by Adobe Photoshop on the same input CMYK can disagree, because Photoshop uses source and destination ICC profiles, rendering intents, and dot-gain tables that a fallback formula ignores. For client-facing mockups the difference is rarely visible; for press output it is non-negotiable.
Worked example: magenta plus yellow to red
Take the recipe 0 / 100 / 100 / 0, which is full magenta ink and full yellow ink with no cyan and no black. Substituting into the formula channel by channel, with K = 0 so the (1 − K) factor stays at 1:
- Red channel: 255 × (1 − min(1, 0 × 1 + 0)) = 255 × (1 − 0) = 255
- Green channel: 255 × (1 − min(1, 1.00 × 1 + 0)) = 255 × (1 − 1.00) = 0
- Blue channel: 255 × (1 − min(1, 1.00 × 1 + 0)) = 255 × (1 − 1.00) = 0
The result is RGB (255, 0, 0), which serializes to hex #FF0000 — the textbook red. This confirms that the in-browser calculation arrives at the same output a stylesheet would render. Cross-check the same recipe in the live tool and you will see the swatch turn pure red and the channel panel read 255, 0, 0.
When the approximation is enough, and when it is not
The naive conversion is useful when you only need a quick visual reference — wireframing a layout in HTML, sketching a palette in a brand document, comparing two recipes side by side on screen, or sanity-checking a number a client emailed. None of these jobs require press accuracy, and the deterministic output of the formula makes it easier to talk about a color by its numeric representation rather than by what someone's laptop happens to be displaying.
| Scenario | Use browser preview | Use profile-aware software |
|---|---|---|
| HTML or slide-deck layout mockup | Yes | Not necessary |
| Comparing two CMYK recipes on screen | Yes | Not necessary |
| Producing a final printed brochure | No | Required |
| Generating a contractual color target | No | Required |
| Soft-proofing on a calibrated display | Only as a starting point | Required for a proof |
Print production is the line the tool deliberately does not cross. A commercial press depends on the specific ink set, paper stock, halftone screen, dot gain, and rendering intent, none of which the formula knows about. The CMYK percentages that look right on a laptop display can come back from the press a couple of shades darker, warmer, or duller, because the printer is reproducing the original ink recipe in a defined output color space, not the uncalibrated RGB approximation you saw in your browser. Sending the file to a printer with the recipe intact and asking them which output profile they need is the right workflow for any job where color matters.
Limits and disclosures of the in-browser calculation
A few operational details are worth knowing before you lean on the tool for production decisions:
- The calculation is performed locally in JavaScript; no percentages, channels, or hex values leave the page.
- The tool does not load an ICC profile and does not attempt to simulate any specific press, ink set, or paper.
- The result is labeled an approximation in the spec, on the page, and in the FAQ — by design, it cannot be promoted to a press proof.
- Channel rounding uses half-even tie-breaking for deterministic results.
For a screen mockup or a quick palette check, those limits are exactly what you want: a fast, deterministic, device-independent approximation you can trust to be the same every time you reload the page. For a press contract, switch to profile-aware software with a calibrated display, ask the printer for the output profile, and run a physical proof before approving color.
Practical tips for a faster preview
- When you know the recipe from a Pantone book or a printer proof, copy the four numbers in order and paste them one slider at a time to avoid transcription errors.
- For palette comparisons, build two recipes into the tool back-to-back and read off the relative channel differences rather than the absolute colors.
- If the result drifts far from the sample you expected, double-check the K channel first — adding black changes all three RGB values in lockstep and is the most common source of surprise.
With those habits, the conversion stays in the right role: a fast screen reference for the design phase, and never a stand-in for calibrated printing.