Introduction to HEX Color Codes

Oct 9, 2007 16:16 GMT  ·  By

In web design practice, the usage of colors is a common activity. HTML elements that are contained in web pages could have various color attributes specified. Colors can be defined automatically, using a WYSIWYG HTML editor or manually.

If you want to speed up your design activity, you must understand the way you can specify the color attribute for web page background, table background, fonts, forms and more. The RGB system functions assuming that every color is formed by a mixture of basic colors: red, green and blue. In HTML documents, a color is indicated by its name or RGB HEX equivalent code. Basically, any color can be defined through a corresponding hexadecimal notation.

For example 000000 is the hexadecimal notation for pure black. Every two numbers (00 in this case) represent the amount of red, green and blue, respectively, contained in the web color. If we want to obtain the red color, then the maximal value for its contribution in HEX code must be specified: FF0000. In this way, by modifying the numbers corresponding to a certain red, green and blue contribution, you will be able to create the desired HTML color or to modify an existing one.

You can find on the Internet many color tables displaying the hexadecimal code, RGB equivalent and demo color. You can also use color pickers scripts that will output the hexadecimal code for a chosen color. It is recommended to maintain the default black and white colors if you have to present mainly text content in your web pages. Colorblind people will not make any difference between red and green.

In order to increase your web site accessibility, you must try to select only complementary colors for text, background and menus. Complex color effects, such as multiple color gradients could not be rendered correctly by web browsers, so try to implement single colors with simple shading effects instead. Understanding the hexadecimal color codes can help you save a lot of time when you need to establish the best color combination for your website.