Re: Fallen and Can't get up

by "Comharsa" <comharsa(at)clara.net>

 Date:  Mon, 3 Jan 2000 11:26:29 -0000
 To:  "HWG - Basics" <hwg-basics(at)hwg.org>
 References: 
  todo: View Thread, Original
> >I'm searching for a simple grey background for the text of my website.
Can
> >anyone suggest good places to look on the Net?  Haven't had any luck so
far.
> >
> >Susan Kemp
>
> Susan,
>
> If you make an html page in which you do not specify a color, it will
> automatically be grey. If you wish to be sure, include the following
> inside your body tag:
>
> bgcolor="#CCCCCC"
>
> The CCCCCC is the hexidecimal code for grey. 000000 would be black
> and FFFFFF would be white. The quotes are necessary.
>
> I hope this helps!
>
> Best Regards,
>
> Kevin John Dail

If you don't specify a colour for your page it will be rendered with the
default colour set by the person viewing it. IE depends on your Windows
settings in Display Properties>Appearance. Netscape's default colour is grey
but is easily changed. You can even choose to override colours set in
webpages (though I would think that most people don't).

To set a websafe colour for your background it is worth knowing which
colours are safe, and it is quite easy to do. All colours can be written as
a hexadecimal code made up of six letters or numbers. In each of these the
first two digits refer to the red component, the next two to the green and
the last two to the blue. For websafe colours these pairs must be either 00,
33, 66, 99, CC or FF, where 00 means none of that colour and FF is the
maximum.

So, 000000 would be black as you have no colour in it. FFFFFF would be white
as you have all the colours in it. FF0000 would be bright red, while
reducing the amount of red (CC0000, 990000, 660000 etc.) would gradually
darken the red until you got back to black. The same thing happens with the
greens (00FF00, 00CC00, 009900, etc.) and the blues (0000FF, 0000CC, 000099
etc.)

Greys are where the red, green and blue components are the same value,
CCCCCC, 999999, 666666 and 333333. You can get the other colours by mixing
various amounts of the three main colours (yellow is FFFF00, magenta is
FF00FF). Play around with them to see what happens. As long as you keep to
the six pairs (00, 33, 66 etc.) you will have websafe colours. These six
pairs are where the 216 websafe colours come from, as you have six choices
for each of the three components, so there are 6x6x6 = 216 combinations.

As Kevin said, when including them in your code make sure you include the
quotes and hash symbol e.g. "#339966" (unless you are using CSS but that is
a different story :-))

HTH

Brian
comharsa(at)clara.net

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA