[thelist] Re: [th*chat] Specifying Colors

David McCreath mccreath at ak.net
Fri Dec 14 16:51:32 CST 2001


[ Forwarding from thechat ]

Salvatore Palmisano wrote:

> This might qualify as marginally off-topic for thelist, so Im starting here:


Nah. This is completely on-topic for thelist.


> Why are some colors used in CSS pages only 3 digits?
> (#ccc instead of #cccccc or #cc9 instead of #cccc99)


It's shorthand. I think it might be CSS2, but I'm not sure about that.


> Using cc9 implies that it'll replace left of digit one with the first digit,
> and right of digit three with the third digit.
> Is this right, or is there some other convention for using these shortened
> values?


You're substituting pairs for single values.

#[c(c)][c(c)][9(9)] or #[c(c)][f(f)][0(0)]

It doesn't work unless both values of each pair are the same.


Anyone offer more clarification?


David







More information about the thelist mailing list