You are on page 1of 43

CS8092-COMPUTER GRAPHICS AND

MULTIMEDIA
UNIT-I
ILLUMINATION AND COLOR
MODELS

•Standard Primaries and Chromaticity Diagram


•Intuitive Color Concepts

•Color Models

• RGB Color Model


• YIQ Color Model
• CMY Color Model
• HSV Color Model
• HLS Color Model
•Color Section
TOPICS
 Colors
 Intuitive Color Concepts

 RGB Color Model

 CMY Color Model

 YIQ Color Model

 HSV Color Model

 HLS Color Model

2
WHAT IS COLOR ?

To see color, three


essential elements
must be present:
•light,
•an illuminated
object,
•and an observer.
COLORS
 Colors
 A narrow frequency band within the electromagnetic spectrum.

4
5
6
VISIBLE LIGHT IS AN
ELECTROMAGNETIC WAVE IN THE
RANGE 400-700 NM

Violet light Red light


LIGHT AND COLOR
The frequency ( or mix of frequencies ) of the light determines the color.
The amount of light(sheer quantity of photons ) is the intensity.
Three independent quantities are used to describe any particular color.
hue, saturation, and lightness or brightness or intensity.
The hue is determined by the dominant wavelength.(the apparent color
of the light)

When we call an object


"red," we are referring to
its hue. Hue is
determined by the
dominant wavelength.
LIGHT AND COLOR The saturation of
a color ranges
from neutral to
brilliant. The circle
on the right is a
more vivid red
than the circle on
the left although
both have the
same hue.

The saturation is determined by the excitation purity , and depends


on the amount of white light mixed with the hue. A pure hue is fully
saturated, i.e. no white light mixed in. Hue and saturation together
determine the chromaticity for a given color.
LIGHT AND COLOR

Lightness or
brightness
refers to the
amount of
light the
color reflects
or transmits.

Finally, the intensity is determined by the actual amount of


light, with more light corresponding to more intense colors
( the total light across all frequencies).
•Light that has a dominant frequency or set of frequencies is
called chromatic.
•Achromatic light has no color - its only attribute is quantity or
intensity. Grey level is a measure of intensity.
•The intensity is determined by the energy, and is therefore a
physical quantity.
• On the other hand, brightness is determined by the perception
of the color, and is therefore psychological. Given equally
intense blue and green, the blue is perceived as much darker than
the green.
•Color depends primarily on the reflectance properties of an
object. We see those rays that are reflected, while others are
absorbed. However, we also must consider the color of the light
source, and the nature of human visual system.
• The color of the object depends on the reflectivity of the surface
of the object.
•We observe that the color of the object look different in sun light,
yellow light and white light. This means that color of the object
also depends on the composition of the illuminating light.
•Additive mixing- mixing two primary colors
•Subtractive mixing- mixing two secondary colors
LIGHT AND COLOR

When light strikes


an object,
wavelengths may be
reflected, absorbed
or transmitted.
Colorants can be
mixed to control the
wavelengths and
colors we see.
STANDARD PRIMARIES AND CHROMATICITY
DIAGRAM
 Color models
 Use three primary colors to produce other colors
 Primary colors
 Colors used in a color model to produce all the other colors in that
model.
 Cannot be made from the other (two) colors defining the model.

 CIE color model


 X,Y, and Z: nonexistent, super saturated colors
 Any color S = AX + BY + CZ

14
CIE
 S = AX + BY + CZ can be normalized to
x = A/(A+B+C)
 y = B/(A+B+C)
 z = C/(A+B+C)

 s = xX + yY + zZ, where x + y + z = 1
 s lies in the plane x + y + z = 1 in 3D

=670 15

x =400 z
 Chromaticity values depend only on dominant
wavelength and saturation and are independent of the
amount of luminous energy.
 The points in the boundary are pure colors in the
electromagnetic spectrum, labeled according to
wavelength in nanometer from the red end to the violet
end of the spectrum.
 A standard white light is formally defined by a light
source illuminant C marked by the center dot.
 It identifies the complementary colors.

 It allows to define color gamuts or color ranges, that


shows the effect of adding colors together.

16
 CIE chromaticity diagram
 s'()= (x(), y())
 By plotting x and y for all
visible colors, we obtain the
CIE chromaticity diagram.
 The horseshoe shaped region
represent all visible
chromaticity values.

=670 17

x =400 z
CIE CHROMATICITY DIAGRAM

18
CIE CHROMATICITY DIAGRAM

19
USES OF CIE CHROMATICITY DIAGRAM
 Any colors on the line l between two colors a and b
 Is a convex combination of a and b
 Is a legitimate color
 can be generated by shining various amounts of a and b onto a
screen (like “tweening”)
 Complementary colors
 Any two colors on a line passing through white and added up to be
white are complementary e.g., e and f
 redcyan greenmagenta blueyellow

20
USES OF CIE CHROMATICITY DIAGRAM
 Define color gamuts
 Range of colors that can be produced on a device
 CRT monitor’s gamut is different from printer’s
 Any choice of three primaries can never encompass all
visible colors
 RGB are natural choices for primaries as they can cover the
largest part of the “horseshoe”

21
INTUITIVE COLOR CONCEPTS
tints
white pure color
tones
grays shades

black

 Tint:white pigment added to pure pigment


 saturation reduced
 Shade: black pigment added to pure pigment

 lightness reduced
 Tone: consequence of adding both white and black pigments to
pure pigments 22
INTUITIVE COLOR CONCEPTS
 Tints, shades, and tones  different colors of same hue
are produced
 Grays

= black pigments + white pigments


 Graphics packages that provide color palettes to users
often employ two or more color models

23
RGB COLOR MODEL
 It is additive color model.
 The RGB color model is one of the most widely used
color representation method in computer graphics. It use
a color coordinate system with three primary colors.
R(red), G(green), B(blue)
 The primary purpose is for the display of images in
electronic systems such as television screens, computer
monitors and also used in digital photography.

24
RGB COLOR MODEL
 Each primary color can take an intensity value ranging
from 0(lowest) to 1(highest). Mixing these three primary
colors at different intensity levels produces a variety of
colors. The collection of all the colors obtained by such a
linear combination of red, green and blue forms the cube
shaped RGB color space.
 Additive
 Result = individual contributions of each primary color added
together
 C = rR + gG + bB, where r, g, b  [0, 1]
 R = (1, 0, 0)
 G = (0, 1, 0)
 B = (0, 0, 1) 25
RGB COLOR MODEL

26
COLOR CUBE

27
 The corner of RGB color cube that is at the origin of the
coordinate system corresponds to black, whereas the
corner of the cube that is diagonally opposite to the
origin represents white.
 The diagonal line connecting black and white
corresponds to all the gray colors between black and
white, which is also known as gray axis.
 We begin with black and add on the appropriate primary
components to yield a desired color.

28
RGB COLOR MODEL
 Color Cube
R + G = (1, 0, 0) + (0, 1, 0) = (1, 1, 0) = Y
 R + B = (1, 0, 0) + (0, 0, 1) = (1, 0, 1) = M
 B + G = (0, 0, 1) + (0, 1, 0) = (0, 1, 1) = C
 R + G + B = (1, 1, 1) = W
 1 – W = (0, 0, 0) = BLK
 Grays = (x, x, x), where x  (0, 1)

29
CMY COLOR MODEL
 CMY: Complements of RGB
 In this model cyan, magenta and yellow colors are used
as primary colors.
 Used in light absorbing devices
 Hardcopy output devices
 this concept is used in the printer.
 Subtractive
 Color specified by what is subtracted from white light
 If we subtract red from white, what remains consists of green
and blue which is cyan. The coordinate system of CMY
model use the three primaries’ complementary colors
C(cyan), M(magenta) and Y(yellow)
30
CMY COLOR MODEL

31
COLOR CUBE

32
CMY COLOR MODEL
 W = (0, 0, 0) B = (1, 1, 1)
 Conversion from RGB to CMY

C  R 
M   1  G 
   
Y  B 

 Conversion from CMY to RGB

R C 
   
G
   1  M  33
 B   Y 
CMY COLOR MODEL

 The corner of the CMY color cube that is at (0, 0, 0) corresponds


to white, whereas the corner of the cube that is at (1, 1, 1)
represents black.
 The cartesian coordinate system for the CMY is same as RGB
except that white light instead of black at the origin.
 CMYK model
 K = greatest gray that can be extracted
 Given C, M, and Y
 K = min(C, M, Y)
 C=C–K
 M=M–K
 Y=Y–K

34
YIQ COLOR MODEL
 The luminance-inphase-quadrature model is a recording of
RGB for color television.
 This model was designed to separate chrominance(the
information that defines the color of a television image)
(நிறப்பொலிவு) from luminance(brightness of the
image) (ஒளிர்வு).
 This is used for color TV. Here is the luminance (the only
component necessary for B&W-TV).
 Y-Channel contains Luminance information

 I and Q channels contains color information

35
YIQ COLOR MODEL
 YIQ
 Y: luminance
 I, Q: chromaticity
 Only Y shown in black-and-white TV

 The conversion from RGB to YIQ is given by

Y   0.299 0.587 0.114  R 


    
 I    0.596  0.275  0.321G 
Q   0.212  0.528 0.311  B 
    
36
YIQ COLOR MODEL
 YIQ is formally used in NTSC encoding into broadcast
signal
 Uses human’s visual system properties to maximize
information transmitted in a fixed bandwidth
 Y: 4MHz
 I: 1.5MHz
 Q: 0.6MHz

37
HSV COLOR MODEL
 HSV = Hue, Saturation, and Value
 A.k.a. HSB, where B is Brightness
 RGB, CMY, and YIQ: hardware-oriented
 HSV and HLS: user-oriented

 Cylinder coordinate system


 Space: hexcone
 hexagon is obtained from the color cube in isometric projection
 (h, s, v), where h  [0, 360) and s, v  [0, 1]
 hue: angle round the hexagon
 saturation: distance from the center

 value: axis through the center

38
HSV COLOR MODEL
Color Cube Hexcone

39
HSV COLOR MODEL
 W = (-, 0, 1)
 B = (-, 0, 0)

 R = (0, 1, 1)

Y = (60, 1, 1)
:
M = (300, 1, 1)
 Adding white pigments  S

 Adding black pigments  V

 Creating tones  S and V

40
HSV COLOR MODEL
 True color system: 16 million colors
 Q: Do we need that many?

 Human eyes can distinguish


 128 hues
 130 tints (saturation levels)
 23 shades of yellow colors, 16 of blue colors

 128 x 130 x 23 = 82720 colors

41
HLS COLOR MODEL
 HLS: Hue, Lightness, and Saturation
 Cylinder coordinate system
 Space: double cone
 base is from the hexagon as in HSV
 (h, l, s), where h  [0, 360) and s, v  [0, 1]
 hue: angle round the base
 lightness: axis through the center

 saturation: distance from the center

 W = (-, 0, 1)
 B = (-, 0, 0)

 R = (0, 0.5, 1), Y = (60, 0.5, 1), …

42
HLS COLOR MODEL
 Double cones

white

pure h
color

black 43

You might also like