HTML and CSS Reference
In the early days of color computer screens, only 256 different colors were supported. In that era, a list of 216 colors
was referred to as web-safe colors . This cross-browser color palette was used to ensure that all computers, including
the ones using a 256-color palette, would display the colors correctly. Web-safe colors consist of 00 , 33 , 66 , cc , and ff
values for each channel (for example, 00ff00 , 663300 , 993300 , cc6600 , and ff9966 ).
■ Web-safe colors are not interesting from the presentational point of view anymore, since all modern screens,
monitors, and projectors are capable of representing any colors from the rGB color space.
CSS supports the names of 16 basic colors. These keywords are easier to read than their corresponding hexadecimal
values 4 (Table 5-4 ). Using hexadecimal notation, however, is strictly recommended (see Chapter 13).
Table 5-4. CSS Color Names Handled by All Browsers
aqua (= cyan)
#00ffff ( can be abbreviated as #0ff )
#000000 ( can be abbreviated as #000 )
#0000ff ( can be abbreviated as #00f )
magenta (= fuchsia)
#ff00ff ( can be abbreviated as #f0f )
#00ff00 ( can be abbreviated as #0f0 )
#ff0000 ( can be abbreviated as #f00 )
#ffffff ( can be abbreviated as #fff )
#ffff00 ( can be abbreviated as #ff0 )
4 After learning color mixing with hexadecimal notation, using these values becomes a routine task.