HTML5 and CSS 3 – Illustrated 2nd Ed. Instructor’s Manual: Unit E Page 10 of 14
• Illustrate the structure of color definition in the hexadecimal system: the color definition starts with
a # symbol followed by six characters which may include 0-9 and a-f, where the first two characters
specify the red value, the second two characters specify the green value, and the last two characters
specify the blue value.
TEACHER TIP
Remind students that when using the rgb system, they must be consistent in the units used to
define the red, green, and blue values for a specific color. That is, students should use either
percentages or numeric specification for all three values within a given color definition, and should
not define a color by providing some of the rgb values in percentages and others in numeric
specification.
• Explain the hsl system, which enables a user to create colors by providing values for hue, saturation,
and light.
FIGURES: E-18, E–19
TABLE E-5: CSS color systems
BOXES
1. Quick Tip: Letters in hexadecimal values are not case-sensitive.
2. Quick Tip: In addition to background-color, hex and RGB colors can be used as values for color,
margin-color, or any other property that takes a color as its value.
3. Clues to Use: Understanding hexadecimal values
The two RGB color systems—using a triplet of RGB values or using hexadecimal values—allow
you to specify the same 16.7 million colors. Each value in an RGB triplet can range from 0 to
255, giving you 256 possible values (1–255, plus the value 0). Hexadecimal values provide the
same range using only two characters. The standard decimal numbering system allows 10
possibilities for each digit: the numbers 0–9. Hexadecimal (from roots meaning “six” and “ten”)
offers 16 possibilities for each character: the numbers 0–9 plus the letters A–F.
CLASSROOM ACTIVITIES
1. Critical Thinking:
a. You are creating a website for selling yarn, and want to list the yarn names in the color of the
yarn. Which format system would you use for this purpose? Explain which system would give
you the most flexibility and best change of matching the yarn color accurately.