RGB to CMYK color conversion

 

RGB to CMYK color conversion

RGB to CMYK color code converter and conversion formula.

RGB to CMYK converter

Enter red, green and blue color levels (0..255) and press the Convert button:

Enter red color (R):
Enter green color (G):
Enter blue color (B):
   
Cyan color (C):  
Magenta color (M):  
Yellow color (Y):  
Black key color (K):  
Color preview:  

 

RGB to CMYK conversion formula

The R,G,B values are divided by 255 to change the range from 0..255 to 0..1:

R' = R/255

G' = G/255

B' = B/255

The black key (K) color is calculated from the red (R'), green (G') and blue (B') colors:

K = 1-max(R', G', B')

The cyan color (C) is calculated from the red (R') and black (K) colors:

C = (1-R'-K) / (1-K)

The magenta color (M) is calculated from the green (G') and black (K) colors:

M = (1-G'-K) / (1-K)

The yellow color (Y) is calculated from the blue (B') and black (K) colors:

Y = (1-B'-K) / (1-K)

 

RGB to CMYK table

Color Color

name

(R,G,B) Hex (C,M,Y,K)
  Black (0,0,0) #000000 (0,0,0,1)
  White (255,255,255) #FFFFFF (0,0,0,0)
  Red (255,0,0) #FF0000 (0,1,1,0)
  Green (0,255,0) #00FF00 (1,0,1,0)
  Blue (0,0,255) #0000FF (1,1,0,0)
  Yellow (255,255,0) #FFFF00 (0,0,1,0)
  Cyan (0,255,255) #00FFFF (1,0,0,0)
  Magenta (255,0,255) #FF00FF (0,1,0,0)

 

CMYK to RGB conversion ►

 

See also