CMYK is a subtractive color system, and RGB is an additive color system.
If you have a CMY (K) value (1.0, 1.0, 1.0), it is black, and the RGB value (255, 255, 255) is white.
Cyan + Magenta = Blue: (0, 255, 255) + (255, 0, 255)! = (0, 0, 255). But not quite, because we are talking about different color systems.
First you have to design the pixels in CMYK, and then convert them to RGB, which can be approximated by doing (R, G, B) = (1-C, 1-M, 1-Y) .
To convert a single-bit value to an 8-bit value, you just need to convert each 0 to 0x00 and each 1 to 0xFF : Multiply bitValue by 0xFF .
source share