CMYK to RGB Converter
#B88AE6
A colour worked out from CMYK by formula is an estimate, not how the inks will print: with no ICC profile the conversion knows nothing about the inks, dot gain or the RGB space, and CSS Color 5 warns such an estimate can be visually very far from the printed result. A CMYK value sent to RGB and back can also return different inks, because the formula chooses black itself.
Going the other way? Convert RGB channels to CMYK inks →
How do I convert CMYK to RGB?
CMYK inks become RGB channels by formula: cmyk(20%, 40%, 0%, 10%) is rgb(184, 138, 230). Each channel starts at 255 and is scaled down twice, once by its own ink and once by black, then rounded to a whole number.
- Type the four inks into the box. cmyk(20%, 40%, 0%, 10%), 20 40 0 10 and device-cmyk(0.2 0.4 0 0.1) all read.
- Write each ink as a fraction from 0 to 1: 20% is 0.2 and 10% is 0.1.
- For red, multiply 255 by (1 − C) and by (1 − K): 255 × 0.8 × 0.9 = 183.6. Green uses M and blue uses Y the same way.
- Round each channel to a whole number, a value exactly halfway rounding up, so 229.5 becomes 230.
- Copy the result, or swap the direction to turn the channels back into inks.
Different ink mixes can come out as the same RGB value; the CMYK vs RGB guide explains why a CMYK number describes a printer rather than a colour.
Black Ink Added to an Orange
Black scales every channel by the same factor. Half magenta and full yellow make an orange, and each step of K below takes red and green down by a fifth of where they started, before rounding, until at 100% black nothing is left.
| CMYK | RGB |
|---|---|
| cmyk(0%, 50%, 100%, 0%) | rgb(255, 128, 0) |
| cmyk(0%, 50%, 100%, 20%) | rgb(204, 102, 0) |
| cmyk(0%, 50%, 100%, 40%) | rgb(153, 77, 0) |
| cmyk(0%, 50%, 100%, 60%) | rgb(102, 51, 0) |
| cmyk(0%, 50%, 100%, 80%) | rgb(51, 26, 0) |
| cmyk(0%, 50%, 100%, 100%) | rgb(0, 0, 0) |
Worked Example: cmyk(20%, 40%, 0%, 10%) to RGB
cmyk(20%, 40%, 0%, 10%) uses three inks, and its blue channel lands exactly halfway between two whole numbers, so the rounding rule shows. The working gives each channel before rounding and paints the result.
#B88AE6
Result: cmyk(20%, 40%, 0%, 10%) = rgb(184, 138, 230)
Rounded, the three channels give rgb(184, 138, 230). Sent back through the inverse formula it returns cmyk(20%, 40%, 0%, 10%), the inks this example started from. That is not guaranteed, because the formula chooses black itself and rounds every channel.
- cmyk(20%, 40%, 0%, 10%) as RGB channels: rgb(184, 138, 230)
Check it in reverse
To check the result, work the channel values back into inks; expect the numbers to come back close, not always identical.
Worked examples: CMYK to RGB
Each example gives the value first, then the working. Select a value to load it in the converter.
What is cmyk(20%, 40%, 0%, 10%) in RGB?
cmyk(20%, 40%, 0%, 10%) comes out as rgb(184, 138, 230).
Before rounding, red is 183.6, green 137.7 and blue 229.5; each rounds to the nearest whole number, halfway rounding up.
What is cmyk(0%, 0%, 0%, 30%) in RGB?
cmyk(0%, 0%, 0%, 30%) comes out as rgb(179, 179, 179).
Only black is set, so every channel is 255 × (1 − 0) × (1 − 0.3) = 178.5, exactly halfway, which rounds up to 179.
Every example above converts back through the inverse formula — put the same channels back through the CMYK formula — but the inks that return can differ, because the formula chooses K itself.
What the Inks Give Back
Below are the rules this page follows, in the wording the site uses everywhere. The reference rows are what the converter reads: four inks, each from none to full.
To convert CMYK to RGB by formula, write each ink as a fraction from 0 to 1; then R = 255 × (1 − C) × (1 − K), G = 255 × (1 − M) × (1 − K) and B = 255 × (1 − Y) × (1 − K), each rounded to a whole number.
A CMYK to RGB to CMYK round trip does not always return the starting numbers, because the formula chooses K itself: cmyk(20%, 20%, 20%, 0%) becomes rgb(204, 204, 204), which converts back as cmyk(0%, 0%, 0%, 20%).
iToolHub reads four inks as percentages, with or without the % sign, or as fractions from 0 to 1 inside device-cmyk(), and rounds each channel to a whole number, a value exactly halfway rounding up.
| What | Value |
|---|---|
| The fraction endpoints | 0 = 0%, 1 = 100% |
What Does the RGB Result Not Know?
Ink, Paper and Dot Gain
Real ink on real paper does not behave like the formula. CSS Color 5 names what the formula has no knowledge of, including the colour of the inks and dot gain, and a conversion through an ICC profile for that press is what accounts for them.
Halfway Values Round Up
A channel that lands exactly halfway, such as 229.5, rounds up to 230. CSS Color 4 gives that rule for an rgb() value that cannot keep its fraction, and working the product exactly is what lets a true halfway value show.
Fractions Inside device-cmyk()
CSS Color 5 lets device-cmyk() take each ink as a fraction or a percentage, where 0 = 0%, 1 = 100%. Everywhere else this page reads a plain number as a percentage, and it refuses 0 0.5 1 0 rather than guess which was meant.
Common Mistakes
- Typing inks as fractions outside device-cmyk(). There a plain number is a percentage, so 0.5 would be half of one percent; the page refuses it and shows both spellings.
- Going above 100%. An ink runs from none to full, and 120% is refused rather than cut down to 100%.
- Expecting the screen colour to match the print. The RGB result is the formula's estimate, and the printed colour depends on the press.
- Leaving out the black ink. A CMYK value is four numbers, and three are refused with the count named.
Frequently Asked Questions
What does CMYK stand for?
Cyan, magenta, yellow and black: the four inks CSS Color 5 names, in that order, for a device CMYK colour. Each one is written as a percentage from 0% to 100% or as a fraction from 0 to 1.
What is the difference between RGB and CMYK?
RGB is three channels from 0 to 255 for a colour on screen; CMYK is four ink amounts for print. CSS Color 5 notes that screens typically show RGB while printers often use CMYK, and a press converts between them through an ICC profile, not this formula.
Why does converting CMYK to RGB and back change the numbers?
A CMYK to RGB to CMYK round trip does not always return the starting numbers, because the formula chooses K itself: cmyk(20%, 20%, 20%, 0%) becomes rgb(204, 204, 204), which converts back as cmyk(0%, 0%, 0%, 20%).
Can CMYK values be entered as fractions from 0 to 1?
Yes, inside device-cmyk(), as CSS Color 5 writes it: device-cmyk(0.2 0.4 0 0.1). Elsewhere a plain number is a percentage, so 20 40 0 10 is the same colour, and 0.2 on its own is refused rather than read as a fifth of a percent.
Yes, in the RGB to CMYK direction, though the inks that come back can differ from the ones you started with.
Related Conversions
The rest of the family sits on the full set of colour converters.