×
☰ Menu

RGB Color Model

Each color appears in its primary spectral components of red, green, and blue in the RGB model. A Cartesian coordinate system is used in this model. The color subspace of interest is the cube depicted in the figure below, with RGB primary values at three corners, secondary colors cyan, magenta, and yellow at three other corners, black at the origin, and white at the farthest corner from the origin. In this model, the grayscale (points of equal RGB values) extends from black to white along the line joining these two points. The different colors in this model are points on or inside the cube and are defined by vectors extending from the origin.

Images represented in the RGB color model consist of three component images, one for each primary color. When fed into an RGB monitor, these three images combine on the screen to produce a composite color image, as explained in Section 6.1. The number of bits used to represent each pixel in RGB space is called the pixel depth. Consider an RGB image in which each of the red, green, and blue images is an 8-bit image. Under these conditions, each RGB color pixel [that is, a triplet of values (R, G, B)] has a depth of 24 bits (3 image planes times the number of bits per plane). The term full-color image is used often to denote a 24-bit RGB color image. The total number of possible colors in a 24-bit RGB image is (28 )3 = 16, 777, 216. If the primary images are 8-bit images, the limits of the cube along each axis becomes [0, 255]. Then, for example, white would be at point [255, 255, 255] in the cube.