Tuesday, July 15, 2003

More about the stylesheet

The choice of colors is deliberately limited to those which have been available on the IBM PC since its earliest days. This is the same list of choices supported by the "color" command for setting the color of the DOS prompt. The following table shows the codes and names that DOS/Windows gives to these colors, their actual RGB values, and the nearest "websafe" equivalent. Anybody designing a website and wanting to give it that "DOS/EGA" look should pick colors from this list.

code name real RGB websafe
0 Black 000000 000000
1 Blue 000080 000099
2 Green 008000 009900
3 Aqua 008080 009999
4 Red 800000 990000
5 Purple 800080 990099
6 Yellow 808000 999900
7 White c0c0c0 cccccc
8 Gray 808080 999999
9 Light Blue 0000ff 0000ff
A Light Green 00ff00 00ff00
B Light Aqua 00ffff 00ffff
C Light Red ff0000 ff0000
D Light Purple ff00ff ff00ff
E Light Yellow ffff00 ffff00
F Bright White ffffff ffffff

Admission: in real MS-DOS, it was not possible to set the background to any of the "light" colors (8-F). This restriction has been lifted in the Windows NT/2000/XP command prompt. This website ignores this issue and freely uses #999999 as a background color. Yes, #999999 (gray) counts as a "light" color because it is technically light black. I'm not kidding; I have the first edition of Norton's Guide to the IBM PC to back me up.