Marketing Articles
 


Color Control - Hex Codes For Your Website

Throughout the history of the Internet the amount of customizable aspects a person can use in their websites has changed and expanded quite a bit. The ability to change the colors of almost every feature and type of text is just one example, but knowing how to make those changes is still a mystery to some.

Back when Netscape 1.1 ruled the web browser world the only aspects people were able to alter the color of with HTML were: the background color, the text color, the link, visited link, and active link colors, and the table colors. Now, through the development of CSS (Cascading Style Sheets), people have the ability to alter the color of most any feature they can imagine while doing web design. You can make all of your bold text blue, your underlined text pink, your italics all green, and your bullets orange if you really want to. Granted that many different colors may not look as wonderful as you may have hoped, but it can be done should the mood strike. There are a great many colors to choose from and they can all be defined with a 6 digit hexadecimal color code.

The Color Codes

The color codes used in HTML and CSS consist of 6 digits. The first 2 letters or numbers determine the amount of red, the second set of 2 is the amount of green, and the third represents the amount of blue. This combination of red, green, and blue (RGB) creates the single color you are defining in your code. For example; if you want the hex code for the color red you would begin with the first 2 digits, the set that define the amount of red in the color, set to full, or F, and the following 4 digits set to 0, to show that there is no green or blue being used. Your resulting code would look like this #FF0000 and when used show a pure and vibrant red color. If you wanted a pure bright green your color code would be #00FF00, and for blue #0000FF.

Sometimes having to play around with the color codes to determine the exact shade you want is tedious and wastes a great deal of time. Thankfully several websites offer easier, time-saving solutions.

During the Netscape era people found that to make a website look the best it could in their web browser, they had to use only the colors that fell within the 216 “web-safe” color palette. The reason for this was because most computer displays could not show more than 256 colors so if one was chosen that the computer couldn't accept, dithering would occur. Dithering is used when a color is not available by using small pixels of accepted colors side by side so that when viewed from a distance a different color appears to be used. For example, if the color violet was not accepted by a browser for whatever reason, a sort of checkerboard of red and blue pixels would be used instead to create the appearance of violet. Wikipedia offers a detailed and understandable explanation of dithering and includes various visual examples.

Using The Colors

Today in website design a large amount of people prefer to use CSS to define the colors they would like to use. If you've never done CSS before it may be smart to look up a tutorial or introduction to CSS before trying to alter too much. Once you have the basic idea however it's fairly easy to alter a large variety of features by defining specific colors to exactly what you would like. Simply adding color: #000000; into the section of your CSS for the feature you are adjusting will define the color black to whatever page element you are changing. You can switch out the #000000 to the hex code for the color you prefer. If you prefer not to use CSS in your website design HTML color tags are still widely used on the world wide web.

To set a background color in HTML use bgcolor=”#000000” in your body or table tag but replace the black color code with the color you are using. To change the font color also in your body or table tag include text=”#000000” once again replacing the hexadecimal code for the one of your choice. There are additional HTML attributes which can be used to specify color as well.

There is much that can be done with color in web design and a good color palette can make a huge difference in the presentation of your website. And it's easy. So have fun and get creative!