[thelist] CSS: colour attributes

lon.kraemer lwkraemer at directvinternet.com
Sun Aug 11 13:57:03 CDT 2002


> As far as I understand, colour can be specified in a number of ways in
HTML
> and CSS
>
> "white"   a limited number of named colours.
>
> "#FFFFFF" hexadecimal, three groups of two.
>
> rgb(255,255,255) three groups representing, red, green blue.
>
> 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?

CSS allows this abbreviated color value syntax. It's useful only when
the hex values come in pairs (like the so-called "web-safe" colors).

#69c = #6699cc
#333 = #333333

However, #3d3d2a cannot be abbreviated in this fashion.

http://www.htmlhelp.com/reference/css/units.html#color

--
Lon Kraemer
-----------------------------------------




More information about the thelist mailing list