► Note

If you're using Cascading Style Sheets to specify your colors instead of HTML, you actually have the option of using the RGB values or the hexadecimal values as needed.

How Monitors and Web Pages Work Together to Display Color

Have you ever looked at your favorite web site on someone else's monitor and noticed the colors seemed a bit different? This may have been because of the different monitor settings. For example, most newer computer systems and monitors are capable of displaying millions of colors (also called 24-bit color), but that wasn't the case only a few years ago, when most DOS-based PCs were set up to display 256 colors or less (also called 8-bit color). This reduced color palette means you can't always be assured the color you choose for your web page is going to be available on the viewer's system.

To compound the problem, Macintosh systems display a different set of 256 colors than their DOS-based PC counterparts. Only 216 colors between the two computer systems (Mac and PC)

are the same. Those 216 colors have come to be known as the web-safe color palette. You can easily recognize web-safe For a color representation of the web-safe palette, colors by their hexadecimal values. Each of see the Color Swatches section of the color insert. the web-safe colors has RGB values that are multiples of 51, as shown in Table 1-2.

QUICK TIP

RGB

Hex

0

00

51

33

102

66

153

99

204

CC

255

FF

Table 1-2 Web-Safe RGB and Hex Color Values

Table 1-2 Web-Safe RGB and Hex Color Values

Not all web pages require or benefit from the use of web-safe colors. In fact, while the primary benefit of web-safe colors is that they will display uniformly across monitors set to 8- and 24-bit color modes, they will not necessarily display exactly the same across monitors set to 15- or 16-bit color modes (also called high color or thousands of colors).

0 0

Post a comment