Help Index

Back to
geocities

html
Background Color

<body bgcolor=your color> sets the background color

The background color of your page can be just about any color you want. It can be midnight black or forest green, depending on your taste.

The background color is specified within the <body> tag at the beginning of your document. So, if you write in your HTML doc

    <body bgcolor=yellow>

You will create with great a yellow background.

"So," you may be thinking, "which colors can I use? If I type:

    <body bgcolor=snowslush>
"will the browser know I'm looking for a grayish white?" The short answer is: No. Only a limited number of colors can be specified by name (snowslush isn't one of them), and different browsers recognize different sets of colors. So if you want to be precise about your background , you'll want to replace the name of the color, with a hexadecimal code. So your HTML would look something like this:
    <body bgcolor=#ffffff>

Notice all those "f"s in the code? Well, that's how one says "white" in hexadecimal.

The "ffffff" represents the RGB value of white, translated into hexadecimal. Any color that can be displayed on a monitor can be described by its RGB value - its relative amounts of red, green, and blue (each of which is expressed as a two-digit number, such as 51 or 14 or 00).

Now, if you don't want to bother with calculating those numbers, you can just go color shopping: InfiNet, for example, offers hex values for dozens of colors. ColorServe lets you choose a custom color, and then calculates the hex values, as does the shareware program HTML ColorPicker. And if you already know the RGB values of the color you want (you can get these values using image software, such as Photoshop or Illustrator), BEACH RaT will automatically convert them to hexadecimal.


There are many other resources on the web that help you with choosing colors for your web page.
Color Specifier Netcape 3.0
http://www.users.interport.net/~giant/COLOR/1ColorSpecifier.html">
Set up very nicely.
HTML Color Tags
http://www.escape.ca/~skinner/colortag/colrtag.html
A good desrciption of how to caluclate color tags.
RGB Triplet Chart
http://www.oocities.org/SiliconValley/6658/color.html
Another site with color examples.
Palette
http://www.electriciti.com/~rschmitt/toolbox/nspalette/index.html
Pick a color off the "palette" here and see how the background looks in that shade.
ColorMaker
http://www.bagism.com/colormaker/
Interactively change the color for any or all the items in the body tag. Excellent for seeing how the colors look together.
Thalia's Color Composing Engine
http://www.sci.kun.nl/cgi-bin-thalia/color/compose
Another site with an ability to choose and see the colors as they will appear on your page.
Thalia's Color Page
http://www.sci.kun.nl/thalia/guide/color/
More color resources.

This should give you more than a head start. Don't forget to check how your colors look on the web page. It is also of some concern that colors should be checked for visibility on different browsers and even on different operating systems and monitors. How much trouble you want to go through to check this out may depend on how important it is to the site. It may be VERY important on a corporate site for example, not so important on your home page.

Return to Help Index

mailbox ksv@earthling.net

Top | Home | Contents | Tutorials | On-Line Classes | Free Homepage | Graphics |
Publicize | Color Chart | Gadgets | Rings 'n Things | Awards |
Personal Help |