0% found this document useful (0 votes)
121 views

RGB Color Model

The RGB color model uses additive color mixing of red, green and blue light to reproduce colors. It forms a color cube with red, green and blue as the three primary colors at the vertices. The CMY color model is subtractive and uses cyan, magenta and yellow as primary colors applied to surfaces. It is used in printing. The HSV color model represents colors in a cylindrical coordinate system with hue, saturation and value where hue is the color, saturation is purity and value is brightness.

Uploaded by

kavita
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views

RGB Color Model

The RGB color model uses additive color mixing of red, green and blue light to reproduce colors. It forms a color cube with red, green and blue as the three primary colors at the vertices. The CMY color model is subtractive and uses cyan, magenta and yellow as primary colors applied to surfaces. It is used in printing. The HSV color model represents colors in a cylindrical coordinate system with hue, saturation and value where hue is the color, saturation is purity and value is brightness.

Uploaded by

kavita
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

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.

The RGB Color Model

The red-green-blue model is formed by a color cube .

Figure: The RGB-cube

Conversion from to is given via the chromaticities


, and of the CRTs phosphors by matrix multiplication via:

Let . Then ,
and .

This can be calculated from , , .


HSV color model:
HSL and HSV are the two most common cylindrical-coordinate representations of points
in an RGB color model. The two representations rearrange the geometry ofRGB in an
attempt to be more intuitive and perceptually relevant than the cartesian (cube)
representation.

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.

Figure: The HSV-model versus the RGB-model

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.

1.4.2 The CMY Color Model


This stands for cyan-magenta-yellow and is used for hardcopy devices. In contrast to
color on the monitor, the color in printing acts subtractive and not additive. A printed
color that looks red absorbs the other two components and and reflects . Thus
its (internal) color is G+B=CYAN. Similarly R+B=MAGENTA and R+G=YELLOW.
Thus the C-M-Y coordinates are just the complements of the R-G-B coordinates:
If we want to print a red looking color (i.e. with R-G-B coordinates (1,0,0)) we have
to use C-M-Y values of (0,1,1). Note that absorbs , similarly absorbs and
hence absorbs all but .

Black ( ) corresponds to which should in


principle absorb , and . But in practice this will appear as some dark gray. So
in order to be able to produce better contrast printers often use black as color. This
is the CMYK-model. Its coordinates are obtained from that of the CMY-model
by , , and .

1.4.3 The YIQ Color Model


This is used for color TV. Here is the luminance (the only component necessary for
B&W-TV). The conversion from RGB to YIQ is given by

for standard NTSC RGB phosphor with chromaticity values


R G B
x 0.67 0.21 0.14
y 0.33 0.71 0.08
The advantage of this model is that more bandwidth can be assigned to the Y-
component (luminance) to which the human eye is more sensible than to color
information. So for NTSC TV there are 4MHz assigned to , MHz to and
MHz to .

The HLS Color Model


Here the RGB-cube is deformed in such a way that a six sided double pyramid results
with the same base as in the HSV-model, but with two tips at black and at white.
Figure: The HLS-model
3 Colour Models

Colour models provide a standard way to specify a particular colour, by defining a 3D


coordinate system, and a subspace that contains all constructible colours within a
particular model. Any colour that can be specified using a model will correspond to a
single point within the subspace it defines. Each colour model is oriented towards
either specific hardware (RGB,CMY,YIQ), or image processing applications (HSI).

3.1 The RGB Model


In the RGB model, an image consists of three independent image planes, one in each
of the primary colours: red, green and blue. (The standard wavelengths for the three
primaries are as shown in figure 1). Specifying a particular colour is by specifying the
amount of each of the primary components present. Figure 5 shows the geometry of
the RGB colour model for specifying colours using a Cartesian coordinate system.
The greyscale spectrum, i.e. those colours made from equal amounts of each primary,
lies on the line joining the black and white vertices.
Figure

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.

3.2 The CMY Model


The CMY (cyan-magenta-yellow) model is a subtractive model appropriate to
absorption of colours, for example due to pigments in paints. Whereas the RGB model
asks what is added to black to get a particular colour, the CMY model asks what is
subtracted from white. In this case, the primaries are cyan, magenta and yellow, with
red, green and blue as secondary colours (see the image on the right of figure 6).

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:

The CMY model is used by printing devices and filters.

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.

3.3 The HSI Model


As mentioned above, colour may be specified by the three quantities hue, saturation
and intensity. This is the HSI model, and the entire space of colours that may be
specified in this way is shown in figure 7.
The
HSI model, showing the HSI solid on the left, and the HSI triangle on the right,
formed by taking a horizontal slice through the HSI solid at a particular intensity. Hue
is measured from red, and saturation is given by distance from the axis. Colours on
the surface of the solid are fully saturated, i.e. pure colours, and the greyscale
spectrum is on the axis of the solid. For these colours, hue is undefined.

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

CMY Color Model

Cyan, Magenta, and Yellow (CMY) are complementary colors of RGB.


They can be used as Subtractive Primaries.
CMY model is mostly used in printing devices where the color pigments on
the paper absorb certain colors (e.g., no red light reflected from cyan ink).
3.4 The YIQ Model
The YIQ (luminance-inphase-quadrature) model is a recoding of RGB for colour
television, and is a very important model for colour image processing. The importance
of luminance was discussed in 1.

The conversion from RGB to YIQ is given by:

0.299 0.587 0.114

0.596 -0.275 -0.321

0.212 -0.523 0.311

The luminance (Y) component contains all the information required


for black and white television, and captures our perception of the
relative brightness of particular colours. That we perceive green as
much lighter than red, and red lighter than blue, is indicated by their
respective weights of 0.587, 0.299 and 0.114 in the first row of the
conversion matrix above. These weights should be used when
converting a colour image to greyscale if you want the perception of
brightness to remain the same. This is not the case for the intensity
component in an HSI image, as shown in figure 8.

You might also like