[thelist] Understanding CSS with 3 digit colors ?
Egor Kloos
studio at dutchcelt.nl
Wed Aug 20 13:20:45 CDT 2003
> Would someone please explain to me why people
> are defining colors with only 3 hex numbers? For example:
>
Normally one would use six, I'm sure you're familiar with that
standard. Using three digits is just an abbreviated form of value
notation. For example white as a hex value would be #FFFFFF. Websafe
colors use three pairs of digits like so; #FF0000 or #33CCFF. The use
of hex values in this way allows for obvious abbreviation.
#FFFFFF = #FFF
#FF0000 = #F00
#33CCFF = #3CF
Using shorthand like this also make a CSS file smaller. Although it may
not look like much any advantage should be utilized. High speed and low
bandwidth, that's something to aim for. A bit here a byte there add up
in the end and makes a difference.
Hope that clears it up.
Egor Kloos
http://www.dutchcelt.nl/
http://www.applematters.com/
More information about the thelist
mailing list