Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

HTML The Definitive Guide (163 page)

BOOK: HTML The Definitive Guide
6.84Mb size Format: txt, pdf, ePub
ads

aliceblue

darkturquoise

lightseagreen

palevioletred*

antiquewhite*

darkviolet

lightskyblue*

papayawhip

aquamarine*

deeppink*

lightslateblue

peachpuff*

azure*

deepskyblue*

lightslategray

peru

beige

dimgray

lightsteelblue*

pink*

bisque*

dodgerblue*

lightyellow*

plum*

black

firebrick*

limegreen

powderblue

blanchedalmond floralwhite

linen

purple*

blue*

forestgreen

magenta*

red*

blueviolet

gainsboro

maroon*

rosybrown*

brown*

ghostwhite

mediumaquamarine royalblue*

burlywood*

gold*

mediumblue

saddlebrown

cadetblue*

goldenrod*

mediumorchid*

salmon*

chartreuse*

gray

mediumpurple*

sandybrown

chocolate*

green*

mediumseagreen

seagreen*

coral*

greenyellow

mediumslateblue

seashell*

cornflowerblue

honeydew*

mediumspringgreen sienna*

cornsilk*

hotpink*

mediumturquoise

skyblue*

cyan*

indianred*

mediumvioletred

slateblue*

darkblue

ivory*

midnightblue

slategray*

darkcyan

khaki*

mintcream

snow*

darkgoldenrod*

lavender

mistyrose*

springgreen*

darkgray

lavenderblush*

moccasin

steelblue*

darkgreen

lawngreen

navajowhite*

tan*

darkkhaki

lemonchiffon*

navy

thistle*

darkmagenta

lightblue*

navyblue

tomato*

darkolivegreen* lightcoral

oldlace

turquoise*

darkorange*

lightcyan*

olivedrab*

violet

darkorchid*

lightgoldenrod*

orange*

violetred*

darkred

lightgoldenrodyellow orangered*

wheat*

darksalmon

lightgray

orchid*

white

darkseagreen*

lightgreen

palegoldenrod

whitesmoke

darkslateblue

lightpink*

palegreen*

yellow*

darkslategray*

lightsalmon*

paleturquoise*

yellowgreen

F.1 Color Values

F.3 The Standard Color Map

Appendix F

 

Color Names and Values

 

F.3 The Standard Color Map

Supporting hundreds of color names and millions of RGB triples is nice, but the reality is that a large, albeit shrinking population of users can display only 256 colors on their system. When confronted with a color not defined in this set of 256, the browser has two choices: convert the color to one of the existing colors, or dither the color using the available colors in the color map.

Conversion is easy; the color is compared to all the other colors in the color map and is replaced by the closest color found. Dithering is more difficult. Using two or more colors in the color map, the errant color is approximated by mixing different ratios of the available colors. Viewed up close, you'll see a pattern of alternating pixels using the available colors. At a distance, the pixels blend to form a color close to the original color.

In general, your images will look best if you can avoid both conversion and dithering. Conversion will make your colors appear "off"; dithering makes them look fuzzy. How to avoid these problems? Easy: use colors in the standard color map when creating your images.

The standard color map actually has 216 values in it. There are six variants of red, six of green, and six of blue that are combined in all possible ways to create these 216 (6 × 6 × 6) colors. These variants have decimal brightness values of 0, 51, 102, 153, 204, and 255, corresponding to hexadecimal values of 00, 33, 66, 99, CC, and FF. Colors like 003333 (dark cyan) and 999999 (medium gray) exist directly in the color map and won't be converted or dithered.

Keep in mind that many of the extended color names are not in the standard color map and will be converted or dithered to a (hopefully) similar color. Using color names, while convenient, does not guarantee that the desired color will be used by the browser.

When creating images, try to use colors in the standard color map. When selecting colors for text, links, or backgrounds, make sure you select colors in the standard color map. Your pages will look better and will be more consistent when viewed with different browsers.

 

F.2 Color Names

 

Document Outline