When we talk about RGB ( Red, Green, Blue) we are referring to a color composition system based on the addition of the primary colors of light.
Primary colors are those that cannot be achieved by combining other colors. They are the basis of an ideal model to define colors based on the behavior of the human eye to the different frequencies of light and its interferences. In some texts they are called primitive colors.
The primary colors of light are:
- red with a wavelength range (λ) of 618-780 nm.
- green with λ between 497-570 nm.
- blue which is around 427-476 nm.
On the other hand, the primary colors of pigments are cyan, magenta and yellow, which, as we will see later, form their own color generation system.
By combining two of these primary colors with each other, always in the same proportion, secondary colors are obtained. For example, taking the RGB model as a base, if we mix red and green at 50% we obtain the color yellow. If we combine the three primary colors, white is generated.
A tertiary color, often called intermediate color, arises from the combination of a secondary color with a primary color. There is a special type of tertiary colors called earths, because of their dull or dirty appearance. These earths are obtained by mixing a primary color with its complementary secondary color in the same proportion. For example, and following the RGB model, if we take green (primary) and add magenta (its complementary secondary) we obtain a color with the three primary colors in the following proportion: 50% green – 25% red – 25% blue.
Applications of the RGB primary color model
One of the applications of this type of additive synthesis models is found in televisions and computer screens. In this case, the screen is composed of tiny squares (called pixels, which are the smallest homogeneous unit of color that is part of a digital image) and each of them is divided into three sub-pixels, one for each primary color.
In lighting, this model is used to create all kinds of colored lights. Instead of having a single LED, we have three different chips, one emitting red light, one emitting green light and finally one emitting blue light. In this way, playing with the different light intensities of each LED, we can generate an almost infinite range of colored lights. This type of LED lights can be found in almost any format such as bulbs, strips or projectors, to give some examples.
To improve the quality of the white light, a quarter LED of conventional white light can be included, these products are called RGBW (from White). In this way, the white light is generated in this LED instead of being the sum of the three basic colors.
Other color imaging models
There are other methods for defining a color space with which to represent shaped color images. These include CYMK and YUV.
It is a model, in this case subtractive, used in printing systems. It is based on cyan, yellow, magenta and black. Ideally, this model and the RGB model are reciprocal. This means that the primary colors of one system are the secondary colors of the other and vice versa. In reality, since neither light nor pigment can be completely pure, there will always be slight discrepancies between the results of one model and the other.
This was used in analog color television systems and allowed compatibility with black and white televisions. The image is transmitted through three components, one with the brightness data (luma) which is the grayscale image and two others for color information (UV). A color television recomposed the image from the three components while a black and white television only took into account the luma (Y).
Digital representation of RGB colors
In computer systems, the intensity of each of the color components is assigned a value. By convention, this value is encoded in one byte resulting in a scale from 0 to 255. Thus, red is (255,0,0), green (0,255,0) and blue (0,0,255). Usually, we can find these values in hexadecimal notation where 0 corresponds to 00 and 255 to FF.
Some colors in RGB format and hexadecimal notation