Aunt Netty

Background Colours

Dear Aunt Netty
    In a recent Frontpage training class, the instructor mentioned using a "colour cube" to select colours for my web page. What does this mean?
-- Pondering pastels    
   
Aunt Netty's Tips
Prev Tip Next Tip

June 8, 1998  


Dear Pondering

Your question has a two-part answer. For the first part, think of the computer that the browser is running on.

Colour on web pages is specified using a hexadecimal RGB code such as F9A3D7, which has three components -- red, green, and blue, hence the name RGB. There are 256x256x256=16,777,216 possible combinations in this 24-bit or true colour mode.

However, sometimes a particular computer cannot show this many colours. For example, it might not have the necessary hardware (video card or monitor), or the computer's operating system might be explicitly set to show fewer colours.

In 16-bit or high colour mode, the computer can show 65,536 colours (more than enough for most images). In 256 colour mode, however, the browser will likely have to make some compromises.

What happens if the image or web page that your browser is trying to show contains different colours or more colours than your computer can handle? It depends on your browser and how it is set up.

The browser may try substituting a different but similar colour, or it may try "faking it" by using combinations of colours in adjacent pixels, which, when viewed from a normal distance, will give an approximation of the actual colour -- this is called "dithering." Please refer to Aunt Netty's tip on Dithering for instructions on changing your computer's display from 256 Color mode.

For the second part of the answer, think of yourself as the designer of the web page that is going to be viewed by someone else's browser. What colours should you use in your web page?

If you use a colour that the person's browser cannot show exactly, it will either substitute another colour or dither to approximate your colour. So the best strategy is to use only "safe" colours. It turns out that there are only 216 colours that all browsers can show -- the so-called browser safe pallet, which consists of 6x6x6=216 combinations, in which each of the red, green, and blue hexadecimal values can have only one of six values -- 00, 33, 66, 99, CC, or FF. These 216 colours are often referred to as the "colour cube" or "Netscape colour cube." These are the only colours that you should use in creating your web pages if you want to be sure that they will not dither or be substituted when someone else views your web page.

For convenience, you can obtain the RGB codes for these 216 colours from Rudy's 216 Colour Cube. This page includes links to Internet sites containing more information on web colours.

What about images and graphics? The clipart graphics provided by Frontpage use only "safe" colours from the 216 colour cube, so you are assured that they will appear on other people's browsers exactly as you see them on yours. Creating your own images to use only the 216 colours is somewhat advanced. Ask Aunt Netty if you would like to have further information on creating your own images.

Finally, please allow Aunt Netty to make a comment about which colours you should use for your web page backgrounds. Research shows that dark coloured text on light backgrounds is easier to read than light coloured text on dark backgrounds. Experiment, but use coloured backgrounds sparingly. Colour can be eye-catching, but it can also distract. Avoid any colour combinations that may cause eye strain. Ask some of your co-workers how they feel about your background colour before you go "live." If in doubt, leave it out.

 Yours truly

Aunt Netty