Sent by Lars Holst on 10 February 2003 09:09
Tim wrote:
>Hello. I'm learning CSS gradually and saw a recent example stylesheet
>where a background color is shown as #333
>I'm accustomed to something like #000333, but that's not the same color
>as #333 (neither is #333000). can someone explain how a css stylesheet
>defines a color like #333, which appears as a grey background in the
>html file
Hi Tim,
Yes, lots of responses to your question, but none of them mentioned "websafe
colors", which I think is at least somewhat related to your question and to
css.
In case you haven't heard (I hadn't just six months ago) the websafe color
range is a set of 216 colors that will give you a pretty consistent
rendering of colors on different platforms and screens. In other words; if
colors are an important part of your design, you should make sure that your
pages look the same on as many comps as possible, and this is the only
realistic way you can do that. Before I learned the word "websafe", I spent
way too much time tweaking my stylesheets just to have the color look the
same on different systems. No more!
However, there's no way of knowing which hexacodes are safe or not by just
looking at them (unless you've memorized them :) so you need to find a good
reference list. The best of the best, AFAIC, is here:
Visibone Webmaster's Color Lab: http://www.visibone.com/colorlab/big.html
Now I wish there was a "websafe" css-positioning reference too.
/Lars
P.S. There's even a much smaller "ultrasafe" set of colors, but they're all
green so not that useful. Unless you really like green of course. Also, many
people will argue that the websafe palette limits the web designer's or
creative director's artistic expression or something similar. This is of
course as true as it is irrelevant since most web designers design or should
design for their users, not themselves.