Webmaster Resources Center

Welcome to the Bravenet Resource Center. Use these resources to help make your web pages more advanced and fun to use.

Articles & Tutorials

Color Codes

by Daniel Insley

Summary :

#00ff00? What does that mean? Well, it's a color code! In this article, we'll take a look at color codes and how you can use them.

A blank HTML document would have default font and text settings if it were opened in an Internet Explorer browser. The settings would look something like this if it were presented in an internal style sheet:

<style type="text/css">
font-face: Times New Roman;
color: #000000;

The first part, "font-face: Times New Roman" tells the browser that the webpage is using a Times New Roman font and the second part, "color: #000000" tells the browser that the color of the text will be #000000... So what does "#000000" mean? Well, that's what this article is about.

The value "000000" is actually a set of three hexadecimal numbers, each digit represents a value for Red, Green, and Blue respectively; RRGGBB. These hexadecimal codes can be referred to as a triplet, or a group of three hexadecimal numbers.

Each digit in the hexadecimal system is a value from 0 to F. The hexadecimal color system counts by 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, with "0" being null value, and "F" being highest value of fifteen. The following table will help you understand the system a little easier:

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Hexadecimal 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

Decimal 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Hexadecimal 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F

The largest value you can assign to one of the values of red, green or blue is FF, which is 255 in the normal decimal system. If we assign a hex color value of "#FF0000" this would display the most amount of red as possible. The code's value has the green and blue values set to null and so there would be no green or blue color present.

There are only 216 colors that are considered "safe" for web browsers. These browser-safe colors should only contain the following values: 00, 33, 66, 99, CC, and FF. You can view a list of all the safe colors that you can use on your webpage by visiting the color reference chart linked at the end of this article.

You can add color to your own website easily. Let's say you want your text to be blue; all you would have to do is put this into your header:

<style type="text/css">
color : #0000FF;

Now that you know what that color code actually is, you can replace it with any color you want! Find the color you want with our Color Reference Chart.