Main Page | See live article | Alphabetical index

RGB color space


Additive color mixing: adding red to green will yield yellow; adding yellow to blue will yield white.

The RGB color space is an additive color space in which red, green, and blue light are combined in various ways to create other colors. The abbreviation "RGB" comes from the three constituent colors; any color in the gamut of the RGB color space can be created by mixing a certain amount of red, green, and blue light.

RGB is known as an additive color space because when light of two different frequencies travel together, from the point of view of an observer, these colors are added to create a new color experience. The colors red, green, and blue were chosen because each one corresponds roughly with one of the three types of color-sensitive cones in the human eye. With the appropriate combination of red, green and blue light, one can reproduce many of the colors that can be experienced by a human. For example pure red and green light produce yellow, red and blue make magenta, blue and green combine to make cyan, and all three together, when mixed at full intensity, create white.

One common application of the RGB color space is the display of computer graphics on a monitor. Each pixel on the screen can be represented in the computer's memory as independent values for red, green and blue. These values are converted into intensities by the computer's display hardware, and sent to the cathode ray tube or LCD display. By using the appropriate combination of red, green and blue light intensities, the computer display can reproduce many of the colors between its black level and white point. Typical display hardware in 2003 uses a total of 24 bits of information for each pixel; this corresponds to 8 bits each for red, green, and blue, giving a range of 256 possible values, or intensities, for each color. With this system, approximately 16.7 million discrete colors can be reproduced.

When written, RGB values are commonly specified using three integers between 0 and 255, representing red, green, and blue intensities, in that order. For example:

The intensity of the color output on computer display devices isn't always linear. That is, even though a value of 127 is very close to halfway between zero and 255, the color output of a computer display device when displaying (127, 127, 127) is often significantly less than halfway between the black level and white point of the display. This is because most display devices have a gamma characteristic different from 1 (i.e. the behavior of most display devices is not linear in the relationship between color value and output intensity), and require gamma correction.

Colors used in web design are commonly specified using RGB; see web colors for an explanation of how colors are used in HTML and related languages.

See also: YUV

Video electronics

RGB is a type of component video signal used in the video electronics industry. It consists of three signals - red, green and blue - carried on three separate cables. Extra cables are sometimes needed to carry synchronising signals. RGB signal formats are often based on modified versions of the RS-170 and RS-343 standards for monochrome video.

External links