[thelist] CSS: colour attributes

R.Livsey R.Livsey at cache-22.co.uk
Sun Aug 11 21:25:00 CDT 2002

> I've been seeing this "#FFF" all over the place for a long
> time. At first, I thought that it was simply sloppy code.
> Then I found Eric Meyer using it. I can't seem to find a
> reference that details the composition of the statement, even
> on the w3c. I'm feeling kind'a stumped, kind'a dumb.
> Can someone point me in the right direction?
> Thanks.
> Frank Marion
> framar at interlog.com


"The format of an RGB value in hexadecimal notation is a '#' immediately
followed by either three or six hexadecimal characters. The three-digit
RGB notation (#rgb) is converted into six-digit form (#rrggbb) by
replicating digits, not by adding zeros. For example, #fb0 expands to
#ffbb00. This makes sure that white (#ffffff) can be specified with the
short notation (#fff) and removes any dependencies on the color depth of
the display."

Basically its shorthand notation, so #F06 is the same as writing

HTH. Cheers.

Incutio Web Developer
[ PHP | Perl | mySQL | Java ]
w : cache-22.co.uk
e : R.Livsey at cache-22.co.uk
  / Richard at incutio.com

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 24/07/2002

More information about the thelist mailing list