HTML and CSS Reference
In-Depth Information
Appendix B
Browser-Safe
Color Palette
Browser-Safe Colors
Three hardware components help deliver color to a computer user: the processor, the
video card, and the monitor. Because of the wide variety of components that exist, the color
quality that users see varies greatly. The software on a user's computer, specifically the Web
browser, also affects the way that color is displayed on a monitor. It is very difficult, if not
impossible, to plan for all possible color variations created by a Web browser. In the past,
Web developers had to make sure that they used browser-safe colors. These browser-safe
colors restricted the number of colors used on a Web page and minimized the impact of
color variations. The trend for monitors today is to display “true color,” which means that
any of 16 million colors can be displayed on the monitor. Few people use 8-bit monitors
anymore, so you generally do not have to limit yourself to browser-safe colors.
A total of 216 browser-safe colors appear the same on different monitors, operating
systems, and browsers—including both Windows and Macintosh operating systems and
Internet Explorer, Apple Safari, Google Chrome, and Mozilla Firefox browsers. When
using color on your Web site, keep in mind that using only the 216 browser-safe colors can
be very restrictive. On those 8-bit monitors, only the browser-safe colors will be displayed.
If you decide to use a non-browser-safe color, the browser will try to create the color
by combining (a process called dithering) any number of the 216 acceptable colors. The
resulting color could be slightly different from the color you had intended.
For a complete list of the 216 browser-safe colors, see Table B-1 on the next page or
visit the Topic Companion Site Web page for this topic at www.cengagebrain.com.
Note that you can use either the color name or the color number when identifying a
particular color to use. For instance, you can use the number #000099 (see color sample on
the following page) or the word “navy” to specify the same color. Also note that to comply
with XHTML standards, color names such as “navy” or “silver” must be all lowercase letters
and all colors, whether identified by name or number, should be enclosed within quotation
marks. Although the topic teaches HTML5, for which the XHTML standards do not apply,
we still stress using lowercase letters and quotation marks.
Search WWH ::




Custom Search