Browser Safe Colors
What Color Should I Use
Today?
Every color you see on your screen
is made up of 3 primary light colors: Red, Green and Blue. The
absence of these colors leaves Black, and the union of all 3 of
these colors creates White. The image on your left demonstrates
what happens when you mix these 3 colors.
"Wait, I was taught that the 3 primary
colors were Cyan, Magenta and Yellow". Well those are also
the primary colors, but they are the primaries for paint, not
light. What's the difference? Well the primaries for light are
for emitting light. The primaries for paint are for absorbing
light.
In the computer environment colors are also created by a
mixture of the three primary colors. But, these colors are red,
green and blue. While our decimal system uses a base of ten to
represent all possible numbers, computers use the hexadecimal
number system. Which consists of 16 unique symbols: The numbers 0
to 9 and the letters A to F. For example, RED is: #FF0000, GREEN is #00FF00, BLUE is #0000FF in hexadecimal. This is also
referred to as the #RRGGBB values.
When developing your Website you can specify the colors of
several items that make up a Web page. These include the
background color, text color, link color, and visited link
color.
For example, I use <body text="#000000" vlink="#999999"
link="#0000FF" bgcolor="#FFFFFF">
to define text
(text), visited link (vlink), link (link), and background color
(bgcolor) colors in my <body> Tag on this Web page.
But, how do you specify color for normal text? There
are two ways to define colors using HTML:
1. Color Code - Use the Color's Hexadecimal
Color code.
2. Color Name - Use one of the 16 color
name.
3. Hex to RGB - Convert your hexadecimal color values to RGB (red, green and blue) values.
Use the Hexadecimal
code:
As mentioned above, the hexadecimal color code for RED is
#FF0000. (Two F's and four Zero's). Let's look at the code
for the color Red and how it relates to the #RRGGBB format:
In the small table above, you can see that the Red pair of
values are two F's, denoting the strongest shade possible and
there is no Green or Blue value at all as indicated with the
zero's (0 denotes no color). These values combine together to
create the hexadecimal color of Red.
To use hexadecimal color coding in an HTML document. First you
need to create a Font Tag:
<font
Then you need to add the Color Attribute:
Note: An 'Attribute' is a parameter for an
HTML Tag, that affects the way the tag is rendered.
<font color=
Next, you need to add a hexadecimal color code value (like
Red):
(Note: An 'Attribute' is a parameter for an
HTML Tag, that affects the way the tag is rendered.)
<font color="#FF0000">
Then add the text you want to color, and close the font
tag:
<font color="#FF0000">This is the text I want
to color.</font>
Your text will be displared in Red, like this:
This is the text I want to
color.
The tables below show the Web safe colors and their
hexadecimal values. These are known as "browser-safe colors" and
will appear the same using both the Netscape and Microsoft
browser on either MAC or PC.
|