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

CIT 2211 - Lecture 4 - Colour

Uploaded by

risksentinel.obj
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

CIT 2211 - Lecture 4 - Colour

Uploaded by

risksentinel.obj
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

COLOUR

CIT 2211 INTRODUCTION TO COMPUTER GRAPHICS


Physical Background
• Visible light: a narrow band of
electromagnetic radiation →
380nm (blue) - 780nm (red)
• Wavelength: Each physically
distinct colour corresponds to at
least one wavelength in this
band.
• Spectrum: Intensity as
a function of wavelength
• The colour of an object: is the
product of the spectrum of the
incident light with the light
absorption and/or reflection
properties of the object.
Human Colour perception
• The human eye does not perceive individual light
wavelengths.
• It contains three types of colour receptor (cones) which
integrate over parts of the spectrum:

From http://math.ucr.edu/home/baez/physics/General/BlueSky/blue_sky.html
Human Colour perception
• It is therefore possible to characterise a psycho-visual
colour by specifying the amounts of three primary colours:
red, green and blue, mixed together.
• This leads to the standard RGB space used in television,
computer monitors, etc.
• We specify the levels of R, G and B in the range [0, 1], but
they can easily be extended to other ranges (8-bit integers
for example).
(1,1,1)

RGB

(0,0,0)
Intuitive Colour Concepts
• Colour mixing created by an artist
• Shades, tints and tones in scene can be produced by
mixing colour pigments (hues) with white and black
pigments

• Shades
• Add black pigment to pure colour
• The more black pigment, the darker the shade
• Tints
• Add white pigment to the original colour
• Making it lighter as more white is added
• Tones
• Produced by adding both black and white pigments
Characteristics of Colour
• Dominant frequency (hue, colour)

• Brightness (area under the curve), total light energy

• Purity (saturation), how close a light appear to be a pure


spectral colour, such as red

• Chromaticity is used to refer collectively to the two properties


describing colour characteristics: purity and dominant
frequency
The CIE Chromaticity Diagram
• CIE: International Commission on Illumination (Comission
Internationale de l’Eclairage).
• Shows colour compositions as a function of x(red) and
y(green)
• Luminance values are not available because of
normalization
• Colors with different luminance but same chromaticity map
to the same point

• Usage of CIE chromaticity diagram


• Comparing colour gamuts for different set of primaries
• Identifying complementary colors
• Determining purity and dominant wavelength for a given colour
The CIE Chromaticity Diagram
• A tongue-shape curve formed by
plotting the normalized amounts
x and y for colours in the visible
spectrum Spectral
Colors
• Points along the curve are
spectral colour (pure colour)
• Purple line, the line joining the
red and violet spectral points
• Illuminant C, plotted for a white C

light source and used as a


standard approximation for
average daylight
Illuminant Purple
Line
The CIE Chromaticity Diagram
 To determine the range of colors
that can be obtained from the 3
given colors in the Chromaticity
Diagram, we simply draw
connecting lines to each of the
three colour points.
 The result is a triangle and any
colour inside a triangle is
produced by various
combinations of the three initial
colours.
 The triangle shows a typical
range of colours (called the
colour gamut) produced by RGB
monitor
Complementary Colours
subCR

• Additive
• Blue is one-third
• Subtractive
• Yellow (red+green) is two- • Orange (between red
thirds and yellow)<>cyan-blue
• When blue and yellow light • green-cyan<>magenta-
are added together, they red colour
produce white light
• Pair of complementary
colours
• blue and yellow
• green and magenta subYM
addRG • red and cyan
The CIE Chromaticity Diagram
• Complementary colors
• Represented on the diagram
as two points on opposite
sides of C and collinear with C
• The distance of the two colors
C1 and C2 to C determine the
amount of each needed to
produce white light
The CIE Chromaticity Diagram
• Dominant wavelength
• Draw a straight from C through
colour point to a spectral colour on
the curve, the spectral colour is the
dominant wavelength
• Special case: a point between C
and a point on the purple line Cp,
take the compliment Csp as
dominant
• Purity
• For a point C1, the purity
determined as the relative distance
of C1 from C along the straight line
joining C to Cs
• Purity ratio = dC1 / dCs
Colour Models
• Method for explaining the properties or behavior of colour
within some particular context
• Combine the light from two or more sources with
different dominant frequencies and vary the intensity of
light to generate a range of additional colors
• Primary Colors
• 3 primaries are sufficient for most purposes
• Colour gamut is the set of all colors that we can produce
from the primary colors
• A Complementary colour is two primary colors that
produce white
• Red and Cyan, Green and Magenta, Blue and Yellow
Colour Models
• The purpose of a colour model (also called colour Space or
colour System) is to facilitate the specification of colors in some
standard way

• A colour model is a specification of a coordinate system and a


subspace within that system where each colour is represented
by a single point

• Colour Models

RGB (Red, Green, Blue) - used with color CRT monitors


CMY (Cyan, Magenta, Yellow)- used for colour printing
CMYK (Cyan, Magenta, Yellow, Black) - colour printing
HSI (Hue, Saturation, Intensity)
YIQ (Luminance,In phase, Quadrature) - broadcast TV color
system
The RGB Colour Model
• Basic theory of RGB colour model
• The tristimulus theory of vision: It states that human eyes
perceive colour through the stimulation of three visual
pigment of the cones of the retina
• Red, Green and Blue
• Model can be represented by the unit cube defined on R,G
and B axes
The RGB Colour Model
• The primary colors are red, green, and blue.
• It is an additive model, in which colors are produced by adding
components, with white having all colors present and black being
the absence of any colour.
• Used for active displays such as television and computer screens.

• The RGB model is usually represented by a unit cube with one


corner located at the origin of a three-dimensional colour
coordinate system, the axes being labeled R, G, B, and having a
range of values [0, 1].
• The origin (0, 0, 0) is considered black and the diagonally
opposite corner (1, 1, 1) is called white. The line joining black to
white represents a gray scale and has equal components of R, G,
B.
The CMY and CMYK Colour Models
• Colour models for hard-copy devices, such as printers
• Produce a colour picture by coating a paper with colour pigments
• Obtain colour patterns on the paper by reflected light, which is a
subtractive process
• The CMY parameters
• A subtractive colour model can be formed with the primary colors
cyan, magenta and yellow
• Unit cube representation for the CMY model with white at origin
The CMY and CMYK Colour Models
• Most devices that deposit colour pigments on paper
(such as colour Printers and Copiers) requires CMY
data input or perform RGB to CMY conversion
internally

• Transformation between RGB and CMY colour


spaces
• Transformation matrix of conversion from RGB to
CMY  C  1  R 
M   1  G 
    
 Y  1  B  R  1  C 
G   1   M 
• Transformation matrix of conversion from CMY to      
RGB  B  1  Y 
CMY and CMYK Colour Model
• CMY is a Subtractive colour Model, where adding different
pigments causes various colors not to be reflected and
thus not to be seen.
• Here, white is the absence of colors, and black is the sum
of all of them
• Equal amounts of Pigment primaries (Cyan, Magenta and
Yellow) should produce Black
• In practice combining these colors for printing produces a
“Muddy-Black” colour
• So in order to produce “True-Black” a fourth colour “Black”
is added giving rise to CMYK model
HSI colour Model
• Hue (dominant colour seen)
• Wavelength of the pure colour observed in the signal.
• Distinguishes red, yellow, green, etc.
• More the 400 hues can be seen by the human eye.
• Saturation (degree of dilution)
• Inverse of the quantity of “white” present in the signal. A pure
colour has 100% saturation, the white and grey have 0%
saturation.
• Distinguishes red from pink, marine blue from royal blue, etc.
• About 20 saturation levels are visible per hue.
• Intensity
• Distinguishes the gray levels.
• Two values (Hue & Saturation) encode chromaticity
• Intensity encode monochrome part.
The YIQ and Related colour Models
• A recoding of RGB for transmission efficiency and for
downward compatibility with black and white television.
• Here Y=luminance, the same as the CIE Y primary. Only
the Y component of a color TV signal is shown on black-
and-white TVs.
• Chromaticity information (hue and purity) is incorporated
into the I and Q parameters
• I stands for in-phase, while Q stands for quadrature,
referring to the components used in quadrature amplitude
modulation.
• Transmitted using NTSC (National Television System
Committee) standard
• More bits of bandwidth are used to represent Y than to
represent I and Q, because our eye is more sensitive to
changes in luminance
The HSV colour Model
• The HSV parameters
• Colour parameters are hue (H), saturation (S) and value (V)
• Derived by relating the HSV parameters to the direction in
the RGB cube
• Obtain a colour hexagon by viewing the RGB cube along the
diagonal from the white vertex to the origin
The HSV Colour Model
• The HSV hexcone
• Hue is represented as an angle about the vertical axis ranging
from 0 degree at red to 360 degree
• Saturation parameter is used to designate the purity of a colour
• Value is measured along a vertical axis through center of
hexcone
HSV Colour Model Hexcone

• Colour components:
• Hue (H) ∈ [0°, 360°]
• Saturation (S) ∈ [0, 1]
• Value (V) ∈ [0, 1]
The HSV Colour Model

• Hue is the most obvious characteristic of a colour


• Chroma is the purity of a colour
• High chroma colors look rich and full
• Low chroma colors look dull and grayish
• Sometimes chroma is called saturation
• Value is the lightness or darkness of a colour
• Sometimes light colors are called tints, and
• Dark colors are called shades
Comparison

RGB CMY CMYK YIQ HSV HSL


Colour Selection and Applications
• Graphical package provide colour capabilities in a way
that aid users in making colour selections
• For example, contain sliders and colour wheels for RGB
components instead of numerical values

• Colour applications guidelines


• Displaying blue pattern next to a red pattern can cause eye
fatigue
• Prevent by separating these colour or by using colours from
one-half or less of the colour hexagon in the HSV model
• Smaller number of colors produces a better looking display
• Tints and shades tend to blend better than pure hues
• Gray or complement of one of the foreground colour is usually
best for background

You might also like