Jump to content

RGB color model

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 166.70.8.xxx (talk) at 05:24, 26 September 2001 (Initial pass describing basics, examples, and why gamma sucks). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

RGB is the color space most commonly used to display computer graphics on a monitor. For each pixel in the image, a red value, a green value and a blue value is stored. These three colors correspond to the three types of color-sensitive cones in the human eye, and can therefore reproduce any color percievable by humans which happens to be between the black level and white point of the monitor being used to display the image. Typically these values vary between zero and 255.


As an example:

 *  (0, 0, 0) is black
 *  (255, 255, 255) is white
 *  (255, 0, 0) is red
 *  (0, 255, 0) is green
 *  (0, 0, 255) is blue
 *  (255, 255, 0) is yellow
 *  (0, 255, 255) is cyan
 *  (255, 0, 255) is magenta


It is important to note that 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 measured, you would likely find it to be significantly higher than halfway between the black level and white point of your monitor. This is because most display devices have a display gamma. (i.e. the behavior of most display devices is, unfortunately, not linear in the relationship between color value and output intensity).