By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
When specifying colors for Web page backgrounds, fonts, and other elements for 256-color displays (the most common display capability), you will probably want to choose from the 216 colors that look the same on both PC and Mac operating systems. Both the Netscape and Microsoft browsers have to work without the colors that each operating system reserves for itself. Since there are a total of 40 reserved colors on both systems, that leaves 216 colors for you to use. If you do use one of the 40 colors, each system tries to approximate it with some combination of the 216 acceptable colors (this is called dithering). Unfortunately, each operating system does dithering a bit differently. The result on a browser on one or both of the operating systems is likely to not be what you intended.
By using only the colors in the "browser-safe palette" table below, you'll be sure that your colors will look the same on both operating systems. The table shows the hexadecimal or red-green-blue (RGB) intensity value that you need to specify in the < BODY > tag for backgrounds and in the < FONT > and other tags containing color attributes. The first two hexadecimal (hex) digits are the red (R) value in the color; the second two are the green (G) value; and the third two are the blue (B) value. The six hexadecimal values create over 16 million possible colors and with a display adapter capable of providing those colors, all of them can be used. Remember that the 216-color limit is because you're assuming many of your viewers will have only a 256-color capable display.
As it happens, each RGB hex pair in the browser-safe palette contains one of values: 00, 33, 66, 99, CC, or FF. Each block illustrates the effects of increasing the levels of each color. Each block of 36 colors, from top to bottom, contains a twenty percent increase in red. From left to right in each box, the amount of green is increased by twenty percent. From top to bottom in each box, each block shows an increase of blue by twenty percent. The hex value you would code is superimposed on the color it produces.
Most Web page creation or HTML editors include a facility that lets you easily view and select colors for your page. You may find this table handy, however, when your editor is not accessible. Photoshop and other art creation tools now tend to include some version of this table. Or you can order a mousepad that shows the 216 colors from Raymond Pirouz, author of click here.