Convert RGB to CMYK in One Click
Paste any RGB colour value and get the exact CMYK equivalent instantly — no sign-up, no software, nothing to install. Perfect for sending screen colours to a print shop or matching a brand colour across digital and physical media.
How to Use the RGB to CMYK Converter
- Enter your R, G, B values (each 0–255) into the tool above — or type a hex code and it fills in automatically.
- The tool converts in real time and shows the CMYK percentages (C, M, Y, K each 0–100%) instantly.
- Copy the CMYK value and paste it into Illustrator, InDesign, or your printer's colour dialog.
- You also get a live colour swatch so you can eyeball the result right away.
Worked Example: Converting a Brand Blue
Say your web team uses the blue RGB(0, 102, 204) — a strong mid-blue common in corporate branding. Here is what you get:
| Format | Value |
|---|---|
| RGB (input) | rgb(0, 102, 204) |
| HEX | #0066CC |
| CMYK (output) | C:100% M:50% Y:0% K:20% |
| HSL | hsl(210, 100%, 40%) |
The four CMYK channels mean: C = Cyan, M = Magenta, Y = Yellow, K = Key (black). This particular blue needs full cyan ink, half magenta, no yellow, and a touch of black — which is exactly what you hand to your print supplier.
The tool also shows a live swatch so you can compare the on-screen colour to what you entered before you copy anything.
How to Convert RGB to CMYK in Code
If you need this conversion in a script or build pipeline, here are two minimal, copy-pasteable snippets.
Python
def rgb_to_cmyk(r, g, b):
# Normalise 0-255 to 0-1
r1, g1, b1 = r / 255, g / 255, b / 255
k = 1 - max(r1, g1, b1)
if k == 1:
return (0, 0, 0, 100) # pure black
c = (1 - r1 - k) / (1 - k)
m = (1 - g1 - k) / (1 - k)
y = (1 - b1 - k) / (1 - k)
return tuple(round(v * 100) for v in (c, m, y, k))
print(rgb_to_cmyk(0, 102, 204))
# Output: (100, 50, 0, 20)
JavaScript
function rgbToCmyk(r, g, b) {
const r1 = r / 255, g1 = g / 255, b1 = b / 255;
const k = 1 - Math.max(r1, g1, b1);
if (k === 1) return { c: 0, m: 0, y: 0, k: 100 };
return {
c: Math.round(((1 - r1 - k) / (1 - k)) * 100),
m: Math.round(((1 - g1 - k) / (1 - k)) * 100),
y: Math.round(((1 - b1 - k) / (1 - k)) * 100),
k: Math.round(k * 100)
};
}
console.log(rgbToCmyk(0, 102, 204));
// Output: { c: 100, m: 50, y: 0, k: 20 }
Both snippets use the same straightforward normalisation formula — no external library needed.
How the Conversion Works
RGB is an additive colour model: screens mix red, green, and blue light to make colours. CMYK is subtractive: printers layer cyan, magenta, yellow, and black inks that absorb light. The converter first finds the black channel (K) from the darkest component, then derives C, M, and Y relative to that black level.
The formula follows the standard mathematical relationship between the two models. For the full colour science background, see the W3C CSS Color Level 4 specification, which covers colour spaces and conversions in depth.
Your data never leaves your browser. The converter runs entirely in JavaScript on your device — nothing is uploaded to any server, so colour-sensitive brand assets stay private.
When to Use RGB to CMYK Conversion
- Sending artwork to a print shop — most commercial printers require CMYK files; handing them an RGB value risks unexpected colour shifts.
- Matching brand colours across a website (RGB/HEX) and printed materials like business cards or packaging.
- Preparing files in Illustrator or InDesign — both apps let you enter CMYK percentages directly in the colour picker.
- Double-checking a designer's spec sheet when you only have the screen hex code.
When This Conversion Has Limits
- Highly saturated RGB colours (vivid greens, electric blues) can fall outside the CMYK gamut — the printable range of colours. The maths still runs, but the printed result will look duller than the screen version.
- Spot colours (Pantone) are a separate system. Use a Pantone colour bridge or ask your printer if you need spot-colour accuracy.
- This tool uses the standard mathematical formula. Colour-critical print work (fine art, brand packaging) may benefit from a colour-managed workflow (ICC profiles) in professional software like Adobe Acrobat or Photoshop.