Lect07 New
Lect07 New
Spring 2008
New Mexico Tech
Color Fundamentals
1/2/2025 2
Color Fundamentals
1/2/2025 3
Color Fundamentals
1/2/2025 4
Color Fundamentals
1/2/2025 5
1/2/2025 6
Color Fundamentals
1/2/2025 7
Color Fundamentals
► Tristimulus
Red, green, and blue are denoted X, Y, and Z, respectively.
A color is defined by its trichromatic coefficients, defined as
X
x=
X +Y + Z
Y
y=
X +Y + Z
Z
z=
X +Y + Z
1/2/2025 8
CIE Chromaticity Diagram
It shows color
composition
as a function
of x (red) and
y (green)
1/2/2025 9
RGB Color Model
1/2/2025 10
RGB Color Model
Pixel depth
1/2/2025 11
1/2/2025 12
Safe RGB colors (or
safe Web colors) are
reproduced faithfully,
reasonably
independently of
viewer hardware
capabilities
1/2/2025 13
1/2/2025 14
The CMY and CMYK Color Models
C 1 R
M = 1 − G
Y 1 B
Equal amounts of the pigment primaries, cyan, magenta, and
yellow should produce black. In practice, combining these
colors for printing produces a muddy-looking black.
1/2/2025 16
http://en.wikipedia.org/wiki/CMYK
HIS Color Model
saturation: relative purity or the amount of white light mixed with its hue.
1/2/2025 17
HIS Color Model
1/2/2025 18
HIS Color Model
1/2/2025 19
HIS Color Model
1/2/2025 20
Converting Colors from RGB to HSI
if B G
H =
360 − if B>G
1
−1
( R − G ) + ( R − B )
= cos 2
1/2
( R − G ) + ( R − B )(G − B )
2
1/2/2025 21
Converting Colors from RGB to HSI
3
S = 1− min( R, G, B)
( R + G + B)
1/2/2025 22
Converting Colors from RGB to HSI
1
I = ( R + G + B)
3
1/2/2025 23
Converting Colors from HSI to RGB
► RG sector (0 H 120 )
B = I (1 − S )
S cos H
R = I 1 +
cos(60 − H )
and
G = 3I − ( R + B )
1/2/2025 24
Converting Colors from HSI to RGB
H = H − 120
R = I (1 − S )
S cos H
G = I 1 +
cos(60 − H )
and
B = 3I − ( R + G )
1/2/2025 25
Converting Colors from HSI to RGB
H = H − 240
G = I (1 − S )
S cos H
B = I 1 +
cos(60 − H )
and
R = 3I − (G + B )
1/2/2025 26
1/2/2025 27
1/2/2025 28
1/2/2025 29