Professional Documents
Culture Documents
Color Spaces: DMET501 - Introduction To Media Engineering
Color Spaces: DMET501 - Introduction To Media Engineering
Color Spaces: DMET501 - Introduction To Media Engineering
Color Spaces
Seif Eldawlatly
1
Color
• Color is an essential element of multimedia, used in vector graphics,
bitmapped images, video, animation and text
2
Spectral Power Density
• A spectral power distribution (SPD) is a description of how the intensity
of light varies with its wavelength
3
Tristimulus Theory
• The tristimulus theory of color implies that any color can be produced
by mixing suitable amounts of three additive primary colors
4
RGB Color Space
• In RGB color, the three primaries are standard shades of Red, Green
and Blue
Red
Blue Green
• In fact, RGB cannot represent every visible color. Only colors in the
RGB gamut can be represented in this way
All Possible
Colors
Colors that can
be produced by
RGB
5
RGB Color Space
• Any color is specified as three values (R, G, B) giving the relative
proportions of the three primaries
Examples: If proportions are expressed as percentages:
(100, 0, 0) represents pure primary red
(100, 50, 0) represents a shade of mauve
(0, 0, 0) represents black
(100, 100, 100) represents white
6
RGB Color Space
• The RGB color space can be geometrically represented as a cube with
each axis representing one of the primary colors
7
RGB Color Space
• Color Depth: The number of bits used to represent color
• People cannot distinguish more than 16.8 million colors (224) which can
be represented using 256 different values for each of Red, Green and
Blue
• For each of the primary colors, it can take values from 0 up to 255
9
Indexed Color
• Used in GIF and PNG formats
• In indexed color, instead of storing a 24-bit color value for each pixel,
we use an 8-bit value which serves as an index into a color table
• The color table contains the palette of colors used in the image
10
Indexed Color
• Examples of images and their color table (palette)
11
Indexed Color
• Some colors from the original image may be missing from the palette
Zoomed-in
version
12
Indexed Color
• Dithering can be used to reduce the resulting posterization
13
Other Color Models: CMYK
• CMYK stands for Cyan, Magenta, Yellow and BlacK
• They are the complementary colors of red, green and blue, respectively
14
Other Color Models: CMYK
• The CMYK color space is the color model used in printing
15
Other Color Models: CMYK
• Printers (that use CMYK color model) provide black ink (K) separately
due to 2 reasons:
• Combining the 3 inks (C, M and Y) to get black does not produce a
very good black
• Applying 3 different inks is not very good for the paper and leads to
longer drying times
16
Other Color Models: HSL and HSB
• A color can be identified by its hue (H), saturation (S) and lightness (L)
17
Other Color Models: HSL and HSB
• Hues can be arranged around the rim of a color wheel as used by
painters, with complementary colors opposite to each other
• A hue’s value is the angle between its position on the wheel and the
position of red
• A particular color can be identified as its hue (how far around the circle
from red it is), saturation (how far from the central axis) and lightness
(how far up the axis it is) 18
Other Color Models: HSL and HSB
• HSB is a variant of HSL, where the tones are arranged differently. B
stands for Brightness
19
Other Color Models: HSL and HSB
• Both HSL and HSB are normally distorted
into a cylindrical shape
20
Color Channels
• The R, G and B components of each pixel can be stored as separate
values
Cherries appear
bright in the red
channel and black
in other channels
21
Color Channels
• Each channel can be manipulated independently
• Making adjustments to the channels alters the colors of the image
• The color balance, hue and saturation and color replacement
adjustments change the color of the image as a whole
22
Color Channels
• Channels can also be manipulated to replace one color with another
23
Color Channels
• Alpha channels can be treated as additional color channels
24
Color Channels
• If a person is photographed against a blue background (ensuring that
none of their clothing is blue), an alpha channel can be created for the
blue background to isolate the person
25