Color Spaces


RGB, CMY and CMYK

The 2 most popular color spaces are RGB (Red-Green-Blue) and CMY (Cyan-Magenta-Yellow). These spaces are extremely device dependent. The kind of paper, ink, and printer technology used in the process, heavily impact the final color quality. RGB is normally used on monitors while CMY is used for printers.

Within the RGB color space, Red, Green and Blue are considered as primary colors because these 3 colors can be mixed to create any other color. On the other hand, within the CMY color space, Cyan, Magenta and Yellow are considered as secondary colors because the "reflecting" result is used in order to describe a color in this color space. A "white" light is shined on a "sheet" containing the secondary colors. Since white is, in theory, the full spectrum of colors (in our case, the combination of the maximum values of Red, Green and Blue), the reflection off the sheet will contain the white subtracted with the colors on the sheet.

As such, the RGB color space is considered as ADDITIVE. In this color space, Black (the absence of all colors) is used as the initial color and Red, Green and Blue are then added. When maximum values of Red, Green and Blue are used, the color White is produced. The human eye, a computer monitor, and film are all RGB color space devices. In contrast, the CMY is considered as SUBTRACTIVE. In this color space, the initial color is White and Cyan, Magenta, and Yellow components are used to subtract from the White. As such, in theory, the CMY color space is the opposite of RGB color space.

On printer devices, another component (Black) needs to be added to the CMY components because adding only the maximum values of Cyan, Magenta and Yellow produces a muddy brown color instead of Black as it should in theory. When black is added, the new color space is CMYK. This is more complex than it seems because appropriate amounts of Cyan, Magenta, and Yellow before the Black component is added.


HSB and HSL

HSB (Hue, Saturation and Brightness) and HSL (Hue, Saturation and Lightness) are methods to specify colors numerically. There are many limitations with HSB and HSL and with the advent of the RGB and CMY(K) color specifications, HSB and HSL are no longer popular. HSB and HSL normally computes Hue at approximately 60-degree segments (instead of a continuum) causing visible discontinuities in the color space. Another problem with HSB and HSL is that Lightness is computed as (R + G + B)/3. This computation conflicts badly with the properties of actual color vision of the eye.


Transformation Between Color Spaces

In order to transform color data between the different color spaces, the developer will first have to understand the individual color spaces. The transform logic between the popular color spaces are provided here as a guide:

1. RGB <-> CMY
2. CMY <-> CMYK
3. RGB <-> HSL




 


  Developer's Corner
 
Introduction
Imaging Toolkits
TWAIN
Image Formats
Color Spaces
Auto Recognition
Useful Links
Transform Logic
RGB <-> CMY
CMY <-> CMYK
RGB <-> HSL
Learn More...
Concepts