HTML and CSS Reference
In-Depth Information
Web-Safe Colors
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.
Note
Color Names
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
Color
Hexadecimal Equivalent
aqua (= cyan)
#00ffff ( can be abbreviated as #0ff )
black
#000000 ( can be abbreviated as #000 )
blue
#0000ff ( can be abbreviated as #00f )
magenta (= fuchsia)
#ff00ff ( can be abbreviated as #f0f )
gray
#808080
green
#008000
lime
#00ff00 ( can be abbreviated as #0f0 )
maroon
#800000
navy
#000080
olive
#808000
purple
#800080
red
#ff0000 ( can be abbreviated as #f00 )
silver
#c0c0c0
teal
#008080
white
#ffffff ( can be abbreviated as #fff )
yellow
#ffff00 ( can be abbreviated as #ff0 )
4 After learning color mixing with hexadecimal notation, using these values becomes a routine task.
 
 
Search WWH ::




Custom Search