Using
the Web

  Training

  About CIN

  City of St. Louis

Creating Web Pages:
Using Color

When choosing the colors to use on your web page you should consider how the colors will look on other monitors, resolution settings, browsers, and systems. There are 216 "safe" colors that will display with most browsers, resolutions, and either Macs or PCs. If you choose an "unsafe" color you run the risk of your page being un-readable.

Color is designated by a six digit code - called Hex codes. The six digits are made up of 2 digits for red, 2 digits for green, and the last two digits for blue. Red, green, and blue (or RGB) are the primary colors for light.

Hex Code Examples
RedFF0000 Green00FF00 Blue0000FF
WhiteFFFFFF Black000000 PurpleFF00FF

Safe colors are made up of any combination of the following double-digit codes:

00336699CCFF

  • For a color chart showing the safe colors and hex codes go to http://www.pidwanger.com/pidhelps/colors.html

    More recent browers will support using color names or hex codes. We recommend that you take the extra effort to use the hex codes to ensure the color you desire is being displayed. Using color names can be disastrous if someone with an older browswer views your page. For example, the color name "yellow" will be interpreted as a hex code - and not be anything close to yellow.

    Hex Code to RGB Value Conversion

    HEX RGB
    00 00
    33 51
    66 102
    99 153
    CC 204
    FF 255

    CIN Official Web Site of the City of St. Louis
    This Page Last Modified: Monday, 19-Nov-2007 16:42:39 CST