About web-safe colors

About web-safe colors

In HTML, colors are expressed either as hexadecimal values (for example, #FF0000) or as color names (red). A web-safe color is one that appears the same in Netscape Navigator and Microsoft Internet Explorer on both Windows and Macintosh systems when running in 256-color mode. The conventional wisdom is that there are 216 common colors, and that any hexadecimal value that combines the pairs 00, 33, 66, 99, CC, or FF (RGB values 0, 51, 102, 153, 204, and 255, respectively) represents a web-safe color.

Testing, however, reveals that there are only 212 web-safe colors rather than a full 216, because Internet Explorer on Windows does not correctly render the colors #0033FF (0,51,255), #3300FF (51,0,255), #00FF33 (0,255,51), and #33FF00 (51,255,0).

When web browsers first made their appearance, most computers displayed only 265 colors (8-bit). Today, the majority of computers display thousands or millions of colors (16- and 32-bit), so the justification for using the browser-safe palette is greatly diminished if you are developing your site for users with current computer systems.

One reason to use the web-safe color palette is if you will be developing for alternative web devices such as PDA and cell phone displays. Many of this devices offer only black and white (1-bit) or 256 color (8-bit) displays.

The Color Cubes (default) and the Continuous Tone palettes in Dreamweaver use the 216-color web-safe palette; selecting a color from these palettes displays the color’s hexadecimal value.

To select a color outside the web-safe range, open the system color picker by clicking the Color Wheel button in the upper-right corner of the Dreamweaver color picker. The system color picker is not limited to web-safe colors.

UNIX versions of Netscape Navigator use a different color palette than the Windows and Macintosh versions. If you are developing exclusively for UNIX browsers (or your target audience is Windows or Macintosh users with 24-bit monitors and UNIX users with 8-bit monitors), consider using hexadecimal values that combine the pairs 00, 40, 80, BF, or FF, which produce web-safe colors for SunOS.

Related topics

  • Working with colors

Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Inserting and Formatting Text
Adding Audio, Video, and Interactive Elements
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly