How do you convert RGB to CMYK?
Divide R, G and B by 255. Black is K = 1 − the largest of the three. Then each ink is C = (1 − R − K) ÷ (1 − K), M = (1 − G − K) ÷ (1 − K) and Y = (1 − B − K) ÷ (1 − K). Multiply by 100 for percentages. Pure black (0, 0, 0) is simply K = 100%.
Example: rgb(0, 128, 128)
| Step | Calculation | Result |
|---|---|---|
| R′, G′, B′ | 0/255, 128/255, 128/255 | 0.000, 0.502, 0.502 |
| K | 1 − max(R′, G′, B′) | 50% |
| C | (1 − 0.000 − 0.498) ÷ (1 − 0.498) | 100% |
| M | (1 − 0.502 − 0.498) ÷ (1 − 0.498) | 0% |
| Y | (1 − 0.502 − 0.498) ÷ (1 − 0.498) | 0% |
So rgb(0, 128, 128) (#008080) is cmyk(100%, 0%, 0%, 50%).
What is the RGB to CMYK formula?
R′ = R ÷ 255, G′ = G ÷ 255, B′ = B ÷ 255
K = 1 − max(R′, G′, B′)
C = (1 − R′ − K) ÷ (1 − K)
M = (1 − G′ − K) ÷ (1 − K)
Y = (1 − B′ − K) ÷ (1 − K)
Is this the CMYK my printer will use?
This converter uses the plain arithmetic formula, which treats CMYK as a simple inversion of RGB. It does not use an ICC color profile, so the numbers are a starting point rather than press-ready values. Programs such as Photoshop and Illustrator convert through the profile set in your color settings (for example a coated or uncoated press profile), take ink limits into account and usually add some black to dark tones, so their CMYK values for the same color will differ. For print work, ask your printer for their profile and convert in your design software.
How do I convert RGB to CMYK in Photoshop or Illustrator?
In Photoshop choose Image › Mode › CMYK Color; in Illustrator choose File › Document Color Mode › CMYK Color. Set the CMYK working space your printer recommends in Edit › Color Settings first, because the result depends on it. This page converts color values; to convert a whole image or PDF, use your design software.
How do I convert HEX to CMYK?
Convert the hex code to RGB first (each pair from base 16 to base 10), then apply the formula above. You can paste a hex code into the converter directly; it shows the CMYK result at the same time.
Common colors in CMYK
| HEX | RGB | CMYK | Name | |
|---|---|---|---|---|
#FFFFFF | 255, 255, 255 | 0, 0, 0, 0 | white | |
#000000 | 0, 0, 0 | 0, 0, 0, 100 | black | |
#FF0000 | 255, 0, 0 | 0, 100, 100, 0 | red | |
#00FF00 | 0, 255, 0 | 100, 0, 100, 0 | lime | |
#0000FF | 0, 0, 255 | 100, 100, 0, 0 | blue | |
#FFFF00 | 255, 255, 0 | 0, 0, 100, 0 | yellow | |
#00FFFF | 0, 255, 255 | 100, 0, 0, 0 | aqua | |
#FF00FF | 255, 0, 255 | 0, 100, 0, 0 | fuchsia | |
#808080 | 128, 128, 128 | 0, 0, 0, 50 | gray | |
#FFA500 | 255, 165, 0 | 0, 35, 100, 0 | orange | |
#800080 | 128, 0, 128 | 0, 100, 0, 50 | purple | |
#008080 | 0, 128, 128 | 100, 0, 0, 50 | teal | |
#1E90FF | 30, 144, 255 | 88, 44, 0, 0 | dodgerblue | |
#2E8B57 | 46, 139, 87 | 67, 0, 37, 45 | seagreen | |
#FF5733 | 255, 87, 51 | 0, 66, 80, 0 |
Color Code Converter · HEX to RGB Converter · RGB to HEX Converter · CMYK to RGB Converter
Formulas checked October 2026 against W3C, CSS Color Module Level 4.