输入红、绿、蓝颜色级别(0..255)并按 转换 按钮:
R、G、B值除以255,将范围从0..255改为0..1:
R' = R/255
G' = G/255
B' = B/255
黑色(K)由红色(R')、绿色(G')和蓝色(B')计算得出:
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)
颜色 | 颜色 名称 |
(R,G,B) | 十六进制 | (C,M,Y,K) |
---|---|---|---|---|
黑色 | (0,0,0) | #000000 | (0,0,0,1) | |
白色 | (255,255,255) | #FFFFFF | (0,0,0,0) | |
红色 | (255,0,0) | #FF0000 | (0,1,1,0) | |
绿色 | (0,255,0) | #00FF00 | (1,0,1,0) | |
蓝色 | (0,0,255) | #0000FF | (1,1,0,0) | |
黄色 | (255,255,0) | #FFFF00 | (0,0,1,0) | |
青色 | (0,255,255) | #00FFFF | (1,0,0,0) | |
品红色 | (255,0,255) | #FF00FF | (0,1,0,0) |