Step 3 – HTML Coding (Cont.)

Updated Browser Safe Colors

What Color Should I Use Today?

primary colorsEvery 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:

#FF 00 00
#RR GG BB

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.

216 Browser Safe Colors

#000000 #330000 #660000 #990000 #CC0000 #FF0000
#003300 #333300 #663300 #993300 #CC3300 #FF3300
#006600 #336600 #666600 #996600 #CC6600 #FF6600
#009900 #339900 #669900 #999900 #CC9900 #FF9900
#00CC00 #33CC00 #66CC00 #99CC00 #CCCC00 #FFCC00
#00FF00 #33FF00 #66FF00 #99FF00 #CCFF00 #FFFF00

#000033 #330033 #660033 #990033 #CC0033 #FF0033
#003333 #333333 #663333 #993333 #CC3333 #FF3333
#006633 #336633 #666633 #996633 #CC6633 #FF6633
#009933 #339933 #669933 #999933 #CC9933 #FF9933
#00CC33 #33CC33 #66CC33 #99CC33 #CCCC33 #FFCC33
#00FF33 #33FF33 #66FF33 #99FF33 #CCFF33 #FFFF33

#000066 #330066 #660066 #990066 #CC0066 #FF0066
#003366 #333366 #663366 #993366 #CC3366 #FF3366
#006666 #336666 #666666 #996666 #CC6666 #FF6666
#009966 #339966 #669966 #999966 #CC9966 #FF9966
#00CC66 #33CC66 #66CC66 #99CC66 #CCCC66 #FFCC66
#00FF66 #33FF66 #66FF66 #99FF66 #CCFF66 #FFFF66

#000099 #330099 #660099 #990099 #CC0099 #FF0099
#003399 #333399 #663399 #993399 #CC3399 #FF3399
#006699 #336699 #666699 #996699 #CC6699 #FF6699
#009999 #339999 #669999 #999999 #CC9999 #FF9999
#00CC99 #33CC99 #66CC99 #99CC99 #CCCC99 #FFCC99
#00FF99 #33FF99 #66FF99 #99FF99 #CCFF99 #FFFF99

#0000CC #3300CC #6600CC #9900CC #CC00CC #FF00CC
#0033CC #3333CC #6633CC #9933CC #CC33CC #FF33CC
#0066CC #3366CC #6666CC #9966CC #CC66CC #FF66CC
#0099CC #3399CC #6699CC #9999CC #CC99CC #FF99CC
#00CCCC #33CCCC #66CCCC #99CCCC #CCCCCC #FFCCCC
#00FFCC #33FFCC #66FFCC #99FFCC #CCFFCC #FFFFCC

#0000FF #3300FF #6600FF #9900FF #CC00FF #FF00FF
#0033FF #3333FF #6633FF #9933FF #CC33FF #FF33FF
#0066FF #3366FF #6666FF #9966FF #CC66FF #FF66FF
#0099FF #3399FF #6699FF #9999FF #CC99FF #FF99FF
#00CCFF #33CCFF #66CCFF #99CCFF #CCCCFF #FFCCFF
#00FFFF #33FFFF #66FFFF #99FFFF #CCFFFF #FFFFFF

Grayscale Colors

#000000 #111111 #222222 #333333
#444444 #555555 #666666 #777777
#888888 #999999 #AAAAAA #BBBBBB
#CCCCCC #DDDDDD #EEEEEE

Use color name:
In addition to using hexadecimal code to specify color, you can also use these 16 color names.

New Convert your hexadecimal color values to RGB:
Convert your hexadecimal color values to RGB (red, green and blue) values; or convert your RGB (red, green and blue) values to hexadecimal. Convert.

Color tips:
Colors can make Web pages more readable and can be one of the most important elements of a Website. But, always ensure that your foreground and background color combinations provide sufficient contrast when viewed by someone having color deficits or when viewed on a black and white screen.

With the implemetation of HTML 4.0 by W3C (World Wide Web Consortium), the use of HTML elements and attributes for specifying color has been deprecated (declared obsolete). You are encouraged to use Cascading Style Sheets (CSS) instead.

What will happen if you use depreciated tags? Since literally billions of pages have already been created on the web, it’s a sure bet that support for these tags and attributes will remain in the browsers for a long time to come. I’ll bet they will never be removed.

td bgcolor=”#FF9999″