HTML and CSS Reference
Using an online color chart
You'll also find some useful color charts on the
Web. These charts typically display web colors
that are arranged according to a number of
different criteria with their corresponding hex
code. Using these colors is as easy as choosing
the colors you want in your page and copying
the hex codes into your CSS.
Try out the decorative
name to see if it works
across browsers. If it
doesn't, then use the hex
Q: I heard that if I don't use web-safe colors, my pages will
never look right on other browsers. Why haven't we talked about
A: Back in the early days of web browsers, few people had
computer screens that supported a lot of colors, so the web-safe
palette of colors was created to ensure that pages looked consistent
on most displays.
A: It would take an entire book to answer that question properly,
but there are some basic guidelines to selecting font colors. The
most important is to use colors with high contrast for the text and
the background to aid readability. For instance, black text on a white
background has the highest contrast. You don't always have to stick
with black and white, but do try to use a dark hue for the text, and a
light hue for the background. Some colors, when used together, can
create strange visual effects (like blue and orange, or red and green),
so try your color combinations out on some friends before launching
them on the world.
Q: I've seen hex codes like #cb0; what does that mean?
A: You're allowed to use shorthand if each two-digit pair shares
the same numbers. So, for instance, #ccbb00 can be abbreviated
#cb0, or #11eeaa as #1ea. However, if your hex code is something
like #ccbb10, then you can't abbreviate it.
Today the picture has changed drastically and most web users have
computer displays that support millions of colors. So, unless you have
a special set of users that you know have limited color displays, you
can pretty much count web-safe colors as a thing of the past.
Q: I know how to specify colors now, but how do I choose
font colors that work well together?