RGB Color Model
RGB Color Model
The RGB color model is an additive color model in which red, green, and blue light
are added together in various ways to reproduce a broad array of colors. The name of
the model comes from the initials of the three additive primary colors, red, green, and
blue.
Let . Then ,
and .
All color models treated so far are hardware oriented. The Hue-Saturation-Value
model is oriented towards the user/artist. The allowed coordinates fill a six sided
pyramid the 3 top faces of the color cube as base. Note that at the same height colors
of different perceived brightness are positioned. Value is given by the height,
saturation is coded in the distance from the axes and hue by the position on the
boundary.
Note that conversion from RGB to HSV is given by affine coordinate changes on each
of the 3 four-sided sub-pyramids corresponding each to 1/3 of the color cube.
Figure 5: The RGB colour cube. The greyscale spectrum lies on the
line joining the black and white vertices.
This is an additive model, i.e. the colours present in the light add to form new colours,
and is appropriate for the mixing of coloured light for example. The image on the left
of figure 6 shows the additive mixing of red, green and blue primaries to form the
three secondary colours yellow (red + green), cyan (blue + green) and magenta (red +
blue), and white ((red + green + blue).
The RGB model is used for colour monitors and most video cameras.
When a surface coated with cyan pigment is illuminated by white light, no red light is
reflected, and similarly for magenta and green, and yellow and blue. The relationship
between the RGB and CMY models is given by:
Figure
Figure 6: The figure on the left shows the additive mixing of red,
green and blue primaries to form the three secondary colours yellow
(red + green), cyan (blue + green) and magenta (red + blue), and
white ((red + green + blue). The figure on the right shows the three
subtractive primaries, and their pairwise combinations to form red,
green and blue, and finally black by subtracting all three primaries
from white.
3.2.1 Why does blue paint plus yellow paint give green?
As all schoolchildren know, the way to make green paint is to mix blue paint with
yellow. But how does this work? If blue paint absorbs all but blue light, and yellow
absorbs blue only, when combined no light should be reflected and black paint result.
However, what actually happens is that imperfections in the paint are exploited. In
practice, blue paint reflects not only blue, but also some green. Since the yellow paint
also reflects green (since yellow = green + red), some green is reflected by both
pigments, and all other colours are abosrbed, resulting in green paint.
Conversion between the RGB model and the HSI model is quite complicated. The
intensity is given by
R+G+B
I= ,
3
where the quantities R, G and B are the amounts of the red, green and blue
components, normalised to the range [0,1]. The intensity is therefore just the average
of the red, green and blue components. The saturation is given by:
min (R,G,B) 3
S=1- =1- min (R,G,B)
I R+G+B