RGB Definition

RGB Definition

Stands for “Red Green Blue.” RGB refers to three hues of light that can be mixed together to create different colors. Combining red, green, and blue light is the standard method of producing color images on screens, such as TVs, computer monitors, and smartphone screens.

The RGB color model is an “additive” model. When 100% of each color is mixed together, it creates white light. When 0% of each color is combined, no light is generated, creating black. It is sometimes contrasted with CMYK (cyan, yellow, magenta, and black), the standard color palette used to create printed images. CMYK is a “subtractive” color model since the colors get darker as they are combined. Blending 100% of each color in the CMYK color model produces black, while 0% of each color results in white.

How many colors can be created using RGB?

The number of colors supported by RGB depends on how many possible values can be used for red, green, and blue. This is known as “color depth” and is measured in bits. The most common color depth is 24-bit color, also known as “true color.” It supports eight bits for each of the three colors, or 24 bits total. This provides 28, or 256 possible values for red, green, and blue. 256 x 256 x 256 = 16,777,216 total possible colors in the “true color” palette.

The human eye can only distinguish about seven million colors, so color depths above 24-bit are rarely used.

RGB Example

When displaying a color image on a screen, each pixel has a specific RGB value. In 24-bit color, this value is between 0 and 255, where 0 is no color and 255 is full saturation). A purple pixel will have a lot of red and blue, but little to no green. For example, the following RGB value might be used to create purple:

R: 132   (84 in hexadecimal)
G: 17   (11 in hexadecimal)
B: 170   (AA in hexadecimal)

Since each color has 256 possible values, it can also be represented using two hexadecimal values (16 x 16), as shown above. The standard way to display an RGB value is to use the hexadecimal values for red, green, and blue, preceded by a number symbol, or hashtag. Therefore, the purple color above is defined in RGB as #8411AA.