Netscape specified 216 colors that have precedence in web browsers based on the 256 colors displayed within an 8-bit system. As 40 colors displayed differently between PCs and MACs, they were eliminated.
All web browsers and operating systems recognize these 216 colors, known as web safe colors, which means these colors will look about the same within any browser.
RGB and Hexadecimal Color Codes
Colors are made up of 3 sets of RGB numbers representing the amount of Red, Green and Blue contained within a color. These colors are represented as hexadecimal values.
For example, the hexadecimal numbers for black is #000000. The first two numbers (00) represent the amount of red the color contains. The second two numbers (00) represent the amount of green and the last two numbers (00) represent the amount of blue the color contains. When a color, such as black, contains 00 amount of red, green or blue, this means it contains no amount of that color or 0%.
However, colors containing RGB values of FF contain the most amount of a color or 100%. For example, the hexadecimal value for white is #FFFFFF, which means it contains the most amount of red, green and blue.
The hexadecimal numbers for red are FF0000. To help you to understand this a little bit better, if we break down the hexadecimal numbers, we will find that the color red contains FF amount of red, which is the highest amount. It contains 00 amount of green and 00 amount of blue, both of which are the lowest.
Specifying Colors Within a Web Page
If you would like to specify colors within your web page, you must set color attributes. Attributes determine the appearance of a web page, such as background color, text colors and fonts.
To specify a specific color, you must use the hexadecimal color code within your HTML coding. The hexadecimal color codes can be used throughout your entire web page to specify all of the following:
Web page background color
Font colors
Table background colors
Table border colors
To ensure your colors will be displayed to most Internet users as you had intended, you should always select your colors from the 216 web safe colors, as displayed in the 216 web safe color chart below.
When using colors within your HTML, you can also use the actual color "word" for basic colors such as black, white, red, green, blue and yellow. Your color code might look something like this:
BGCOLOR="RED"
Color Red Green Blue Hexadecimal
Black 0 0 0 #000000
White 255 255 255 #FFFFFF
Red 255 0 0 #FF0000
Green 0 192 0 #00C000
Blue 0 0 255 #0000FF
Yellow 255 255 0 #FFFF00
To specify the background and text color of a web page, place the following color attributes, indicated in bold, within the BODY tag of your web page:
To specify link colors within a web page, place the following color attributes, indicated in bold, within the BODY tag of your web page:
To specify the border color within an HTML table, place the following code within your TABLE code:
| Your Cell Text |

No comments:
Post a Comment