H1 {color: #FF0000;} /* set H1's to red */
H2 {color: #903BC0;} /* set H2's to a dusky purple */
H3 {color: #000000;} /* set H3's to be black */
H4 {color: #808080;} /* set H4's to be medium gray */

If you aren't familiar with this notation, here's a quick
primer. First, *hexadecimal* means base-16
counting, so the basic unit is groups of 16, not the groups of 10 to
which we're accustomed. In hexadecimal numbering, the valid
digits are `0` through `9` and
`A` through `F`. Once you've
reached `F`, the next number is 10. Thus, a child
learning to count in hex would learn this basic progression:

00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F,
20, 21, 22, 23, ...

I realize that it may be a bit weird to think of letters as numbers,
but that's how it works in hex. The digits `A`
through `F` are actually just symbols -- they
could have been anything. Someone just decided that letters would be
easier to remember than invented symbols... plus nobody would have to
invent new names for letters.

How this corresponds to our regular decimal (base 10) numbering is
fairly straightforward. `05` is equal to 5,
`0C` is equal to 12, `0F` is the
same as 15, and `10` is equal to 16. No, really.
`1F` is equal to 31, `20` to 32,
and so on. It goes like this:

01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F,
01, 02, 03, 04, 05, 06 ,07, 08, 09, 10, 11, 12, 13, 14, 15, 16,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
20, 21, 22, 23, ...
33, 34, 35, 36, ...

Computers have been using hex notation for quite some time now, and
typically programmers either are trained in its use or pick it up
through experience. Either way, most programmers are comfortable with
hex notation -- some of them even think in it -- and so
it's part of the CSS specification. Why? Because the
specification was written and edited by programmers. It makes sense
that they'd put in color schemes to which they could relate.

So, by stringing together three hex pairs, you can set a color. A
more generic description of this method is:

#RRGGBB

Viewed in this way, the hex-pair method is a lot like the method we
previously discussed -- the one involving numbers from
to 255. In fact, 255 in decimal is equivalent to
`FF` in hexadecimal, which explains a lot about how
this method works. It's really the same as the last method: it
just uses a different number system. If you have to pick between the
two, use whichever makes you more comfortable.

So, similar to the way you can specify a color using three numbers
from
to 255, you can specify one using three hex pairs. If you have a
calculator that converts between decimal and hexadecimal, then making
the jump should be pretty simple. If not, it might be a little more
complicated. (Of course, you could just not use this method, but that
would be too easy.)

Believe it or not, though, there's a way to set colors that
involves even fewer keystrokes.