You are on page 1of 20

Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

BASICS OF LIGHT AND COLOR


An Overview of Color Sensing

2003

This presentation is intended to be an introduction to the basics of light and color.


The viewer is introduced to light as an electromagnetic quantity, and to the
mechanisms by which light interacts with objects. The processes of producing colors
by addition and subtraction of light are introduced. Then the concept of human color
perception and color description is discussed. Finally the TCS230 is introduced and
its function as a color detector is described.

2003 TAOS, Inc. 1


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

The Spectrum
ƒ Light is a narrow range of
electromagnetic energy
ƒ Electromagnetic waves have the
properties of frequency and
wavelength
ƒ The human eye responds to the band
of wavelengths between 300nm and
700nm.

© Copyright 2001 Minolta Co., Ltd.

Light is a narrow range of electromagnetic energy, to which the human eye is


sensitive.
Electromagnetic energy travels in the form of waves, which can be described by
their amplitude and frequency, or period. Normally light is described by its
wavelength, in the units of nanometers (nm).
Light ranges from approximately 380nm to 780nm. Just outside this range lies
ultraviolet (below 380nm) and infrared (above 780nm). Note that it is not proper to
refer to ultraviolet and infrared radiation as light, since strictly speaking light is only
radiation that we can see.
Most sources used for illumination emit white, or nearly, white light. Newton showed
many years ago using a prism that white light is made up of contributions from all of
the visible wavelengths. The light from any source can be described in terms of the
relative power at each wavelength. This is known as a spectral power distribution
(SPD).

2003 TAOS, Inc. 2


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

How Materials Modify Light


ƒ Vision occurs when light from
surrounding objects reaches the
eye
ƒ Light is both absorbed and
reflected from object surfaces
ƒ The amount of light reflected is
different for each wavelength
ƒ The wavelengths that are reflected
from an object give the object its
apparent color
ƒ In this example, red light is
reflected while blue and green are
absorbed – this object appears red

Materials modify the light incident upon them in several ways. Light can be reflected
from a surface. Light can be absorbed by, or transmitted through, a surface.
In many cases, light is both absorbed by and reflected from a surface. The amount
of absorption and reflection is often dependent on the wavelength, resulting in some
wavelengths being absorbed and others reflected, to varying degrees.
Reflected light from an object, perceived by the human eye, is what gives an object
its color.

2003 TAOS, Inc. 3


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

How Materials Modify Light

Light is passed through, or Light passing through a colored,


transmitted, from a colorless, translucent object is partially
transparent object essentially absorbed by the object. The
unchanged, except for a small transmitted light gives the object its
amount of reflection at the two apparent color.
surfaces.

Light can be transmitted, or passed through, an object in varying degrees. The


amount of transmission can also be dependent on the wavelength. In the diagram
on the left, light is passed through the object unchanged. In this case, the object will
appear clear, such as a window. In the diagram on the right, light is partially
transmitted. In this case certain wavelengths are transmitted and others are
absorbed. This type of object appears translucent, and colored, such as a colored
glass or plastic. This is the principal behind absorptive filters, which are used to
remove or pass certain wavelengths of light.

2003 TAOS, Inc. 4


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

How Materials Modify Light

Light is reflected from a glossy Light is reflected from a matte, or


surface. This reflection at 90 rough, surface. This light is
degrees to the incident angle is scattered in all directions and is
called a specular reflection. known as diffuse reflection.

Opaque surfaces do not pass light but rather reflect or absorb various wavelengths
of light, sometimes in various degrees, as with colored surfaces. Additionally, the
surface quality will affect the way in which the light is reflected. Smooth surfaces,
such as the one depicted on the left, reflect light at an angle that is 90 degrees to
the incident angle. This type of reflection is known as a specular reflection. This type
of surface can be described as glossy, and the specular reflection from incident
light can result in what we call glare.
The surface on the right is rough, or grainy. This surface reflects incident light at
multiple angles, as light reflects from the various angles present in the texture of the
surface. This type of reflection is known as diffuse reflection. The surface can be
described as matte, or flat.

2003 TAOS, Inc. 5


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

How Materials Modify Light

This surface absorbs some ©1996-2003 Chris Kassa


wavelengths, while others are Inks are formulated to absorb
reflected. What we see is the certain wavelengths while
reflected light. reflecting others.

These diagrams illustrate how a surface can create the perception of color by absorbing
certain wavelengths while reflecting others. The chart shows that a blue surface appears
blue because it reflects blue wavelengths, while absorbing all others. All colors in objects
result from selective absorption and reflection of light at various wavelengths.

2003 TAOS, Inc. 6


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

How Materials Modify Light

Apple illuminated under white Apple illuminated under green


light appears normal (red). light appears dark or black.

The apparent color of an object is strongly influenced by the light source.

A key point that follows from the previous slide is that only wavelengths that are
present can be reflected. For example, an object will appear its “usual” color under
white light because all wavelengths are present to be reflected. A “red” apple
appears red under white light because red is reflected and other wavelengths are
absorbed. If the apple is then illuminated with light of a single color, for example
green, there are no wavelengths in the red region to be reflected. Thus, all the light
is absorbed, and the apple appears dark gray instead of red. Similarly, if we
illuminate both the apple and a white sheet of paper with red light, both objects
appear the same. This is because both the apple and the white paper reflect red
light. The paper reflects all wavelengths, but only appears white under white light,
where all wavelengths are present.
The conclusion is that the apparent color of an object is the product of both the
object and the light source used for illumination of that object.

2003 TAOS, Inc. 7


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

How Materials Modify Light

The spectral reflectance curves of typical printing inks

Similar to spectral power distribution curves of a light source (mentioned earlier),


which describe the apparent color of the source, colored surfaces have spectral
reflectance curves which show the amount of light reflected by that surface at each
wavelength.
As one might expect, the red surface (or in this example, the red ink) reflects light in
the red wavelength range. Note that some colors are combinations of several
wavelengths. Also note that brighter colors have a higher overall reflectance.
White paper has a fairly flat curve, reflecting light at all wavelengths.
Finally, note that black reflects almost no light at any wavelength.

2003 TAOS, Inc. 8


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Color Mixing
ƒ Additive Color Mixing
› Applies to light
› Primaries are red, green, and blue (RGB)
› Colors are produced by adding various amounts of each primary
› Mixing additive primaries produces white
ƒ Subtractive Color Mixing
› Applied to pigments and dyes
› Primaries are cyan, magenta, and yellow (CMY)
› Light is subtracted through the process of selective absorption
› Mixing additive primaries produces black

As described earlier, the property of color of an object can be produced, when


illuminated by white light, the absorption of some wavelengths and the reflection of
others. Producing color in this way is known as subtractive color mixing. By
contrast, colors can also be produced through the combination of light of three
different colors. The colors which, when combined, produce the widest range of
other colors are red, green, and blue. These three basic colors are known as
primaries. When the primaries have the right spectral content, they can be
combined in various amounts to produce any other color. When combined equally,
they produce white.

Subtractive color mixing is used when dealing with dyes and pigments (paints).
Subtractive mixing ideally uses a different set of primaries than additive mixing, in
this case cyan, magenta, and yellow. These can be combined to produce any other
color, just as with additive mixing. When subtractive primaries are equally combined,
the resulting color is black.

2003 TAOS, Inc. 9


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Color Mixing – Additive Color


ƒ Red, Green, and Blue additive
primaries produce light only in the
spectral region corresponding to
their color name.
ƒ Varying the amount of the primary
from 0% to 100% results in colors
varying between black and the
particular primary.
ƒ Secondaries are produced by
combining pairs of primaries.

10

This slide graphically illustrates how the additive primaries RGB combine to produce
other colors. In this example, the intensity, or amount, of each primary is equal. The
colors produced by the equal combination of any two primaries, shown in the
overlapping regions, are called secondaries. It is not a coincidence that the
secondaries produced in additive color mixing are the same as the primaries used in
subtractive color mixing. The opposite is also true.
The equal combination of all three primaries is white, as shown in the center of the
diagram.

2003 TAOS, Inc. 10


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Color Mixing – Additive Color


ƒ Web application allows
additive primaries to be
varied from 0% to 100%
ƒ Here, a combination of
100% red, 50% green, and
approximately 50% blue
produces a salmon color.
ƒ See also that 50% green
and 100% red produce
orange – increasing the
green to 100% produces
yellow (see previous slide)
© OMSI 1995-2003

11

Here a web-based application is used to illustrate the effect of combining various


amounts of the RGB additive primaries. In this example, red is added at 100%, with
blue and green at 50%. The resulting overlap of red and green in these proportions
results in orange, rather than yellow as in the previous example. Also, the result of
all three primaries is no longer white, but rather a salmon color.

2003 TAOS, Inc. 11


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Color Mixing – Additive Color


ƒ A color CRT screen consists of
many groups of three colored dots
(called picture elements, or pixels)
ƒ Each pixel has a red, green, and
blue element
ƒ All colors displayed on the CRT
are produced by varying the
brightness of the red, green, and
blue elements in each pixel
ƒ The colors blend together because
the eye cannot resolve individual
pixels at normal viewing distance

12

This slide highlights a very common example of additive color – a color CRT, or
television screen. It works slightly differently than in the previous example, in which
the primaries where combined by layering on top of each other. In this case,
primaries are combined by the averaging effect of the eye. The eye can only resolve
spatial elements down to a certain size, at a certain distance. In this case, at normal
viewing distance, the eye cannot resolve the individual RGB elements in each pixel,
so they effectively are blended together by the eye, and are perceived as a single
colored region. The RGB elements are usually visible upon inspection at close
range.
Various colors are produced as in the previous example; by adjusting the relative
brightness of the R, G, and B elements.

2003 TAOS, Inc. 12


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Color Mixing – Subtractive Color


ƒ Subtractive primaries work by
subtracting light through selective
absorption.
ƒ Varying the amount of the primary
from 0% to 100% results in colors
varying between white and the
particular primary.
ƒ Secondaries are produced by
combining pairs of primaries.

13

Subtractive color mixing works by starting with a white light source, or white
medium, and removing certain wavelengths to produce a color. As with additive
mixing, the amount or concentration and blend of each primary determines the
resulting color.
As noted previously, the secondaries resulting from equal combination of adjacent
subtractive primaries are the same as the additive primaries.
Equal combination of all three primaries produces black.

2003 TAOS, Inc. 13


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Color Perception

“Indeed rays, properly expressed, are not coloured.”


- Isaac Newton, 1675

14

This quote from Isaac Newton is used to illustrate the fact that color is strictly a
human perception; a sensation. Light can be described by wavelength and spectral
distributions, but color is the result of the interaction between light and the human
eye, and the operation of the brain on signals obtained from the eye.

2003 TAOS, Inc. 14


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Color Perception

© Copyright 2001 Minolta Co., Ltd.

15

The human eye is a marvelous and complex design, and even today the process of
converting light energy to the visual stimulus known as color is not fully understood.
It requires an understanding of optics, detectors, neural processing, and cognition.
However, knowledge of a few basic principals is helpful in understanding the
process of color perception.
Light reflected off a colored surface enters our eyes through the cornea and is
focused by the lens on a region at the back of the eye called the retina. The retina
contains light receptors known as rods and cones.
Rods detect very small amounts of light such as starlight and contain only one type
of pigment. Therefore rods to not contribute to color vision. This is why it is difficult
to perceive color in a dimly lit environment.
Cones are responsible for color perception and have much less sensitivity to light.
As the amount of available light increases, the response of the rods falls off and the
cones begin to take over. Cones are described in more detail in the next slide.

2003 TAOS, Inc. 15


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Color Perception
1
ƒ There are two types of
photoreceptors: rods and cones. S M L
0.8

Relative Sensitivity
ƒ Cones are responsible for color 0.6
vision and are found in three types:
L, M, and S having peak sensitivities 0.4
in the long, medium, and short
wavelength regions. 0.2

ƒ All colors are represented by various 0


combinations of values from these 380 480 580 680 780
three receptors – this is called Wavelength, nm
trichromacy, or trichromatic color
representation.

16

There are three types of cones, each responding differently to light of various
wavelengths. Stimuli that result in different color perception have different cone
signals.
The letters L, M, and S represent the three cones with their peak sensitivities in the
long, middle, and short wavelength regions, respectively. The overlap of the
response curves improves color discrimination. If the receptors did not have any
overlap in their spectrum, we would only perceive three hues in the spectrum.
When two stimuli, whether colored lights or illuminated media, produce the same
cones signals, the two stimuli match in color. The cones, as any detector, integrate,
or sum up, the light energy at all wavelengths incident on them. This summation
process is weighted at each wavelength by the response of the receptor at that
wavelength, according to the L, M, and S response curves. The integration process
of the three receptors reduces the entire spectrum to three signals, one for each
cone type, resulting in trichromacy.
Therefore, three signals are necessary and sufficient to describe any color.

2003 TAOS, Inc. 16


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Describing Color
ƒ Colors of objects can be described by
their hue, lightness, and saturation,
and chroma.
ƒ Hue – attribute of a visual perception
according to which an area appears
to be similar to one of the colors, red,
yellow, green, and blue, or a
combination of two of them.
ƒ Lightness – attribute by which a
perceived color is judged to be
equivalent to one of a series of grays
ranging from white to black.
ƒ Saturation – the degree of departure
from a gray of the same lightness

17

When we describe color, rather than specifying three abstract values, we seek to
use terms that have intuitive meaning to describe color. Color names can be used
and conjure reasonably consistent perceptions. In fact, eleven basic color names
have been identified: white, gray, black, red, yellow, green, blue, orange, purple,
pink, and brown. However, within each color, samples may differ widely from each
other. Therefore additional precision is needed in our description.
A more precise method of describing color is by hue, saturation, and lightness. Hue
is the attribute of a color according to its similarity with one of the colors red, yellow,
green, or blue, or a combination of adjacent pairs of these colors considered in a
closed ring, as shown in this slide.
Lightness is the attribute by which a color is judged to be similar to one of a series
of grays ranging from black to white.
Saturation is the degree of departure of the color from a gray of the same lightness,
or described another way, the intensity of the color compared to a gray or white.

2003 TAOS, Inc. 17


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Describing Color - HSV


ƒ HSV is a three-dimensional color coordinate
system, often used in PC applications, based
on the intuitive values of Hue, Saturation,
and Value (or Lightness)
ƒ Hue is represented as an angle from 0 to
360 degrees – red is 0, yellow is 60, green is
120, cyan is 180, blue is 240, and magenta
is 300.
ƒ Saturation ranges from 0 to 1 and defines
how grey the color is – 0 indicates grey and
1 is the pure primary color.
ƒ Lightness reduces the values of the primary
colors while keeping the same ratio.

18

HSV, or hue, saturation, and value (or lightness) is a three dimensional coordinate
system useful for describing a color mathematically. In this model, in which the three
values describe a cone, hue is represented by an angular position on the circle,
similar in concept to that shown on the previous slide.
Saturation ranges from 0 to 1 and is represented by the radius of the hue circle, or
cone. A value of 0 indicates gray and 1 is the pure primary color.
Value, or lightness, is represented by the vertical height of the cone and ranges
from black to white.

2003 TAOS, Inc. 18


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Describing Color - HSV

Hue = 0 (Red) Saturation is reduced Value is reduced


All values at maximum Red becomes pink Result is darker red
Result is intense red Color becomes more gray Color becomes more black
Java applet © Copyright 1997 Eugene Vishnevsky

19

This slide uses screen captures from a java applet to give a visual representation of
the HSV model. Here the result of varying saturation and value, while keeping hue
constant (red) can be seen.
The brightest, purest color is obtained with maximum saturation and value. As
saturation is reduces, the color becomes less intense. In this case, the red becomes
more pink.
With maximum saturation but reduced value, the color remains intense, but
becomes darker. As value is reduced, the color tends toward black. In this last
example, if saturation were also reduced, the color would tend toward gray.

2003 TAOS, Inc. 19


Basics of Light and Color 12/11/2003

TEXAS ADVANCED OPTOELECTRONIC SOLUTIONS

Measuring Color 1

124
0
300 700

124
0
300 700

245
0
300 700

ƒ RGB filters in the TCS230 split incoming


light into three parts
ƒ Color can be completely described by
the three RGB values

20

The TCS230 combines three photodiodes, dye-based RGB (red, green, blue) filters,
and a current-to-frequency converter circuit on a single chip.
Based on the theory of trichromacy, three values, in this case R, G, and B, are
necessary and sufficient to describe any color.
In a color measurement application, a white light source, such as an incandescent
lamp or white LED, is used to illuminate a sample. Reflected light from the sample is
directed to the TCS230, either through a lens, or ideally, simply by close proximity to
the sample.
In the case of a colored source, light from the source is directly incident on the
TCS230.
The three outputs from the TCS230 are then processed to determine color. Details
of methods used to process the RGB values are described in other TAOS
application documents.

2003 TAOS, Inc. 20

You might also like