RGB Color Values

Using RGB / HEX Values in HTML

When discussing computer graphics, the term RGB is shorthand way of saying an image uses the Red/Green/Blue Color Model.

There are many ways to describe color in mathematical terms.  The basic idea is to assign a value to the proportion of each color in the definition.   In the RGB model used in HTML markup, the colors are represented by three hexideicimal pairs, each denoting a value of 0 to 255 for each of the R, G, and B values of a given color.

COLORHex Equiv.RGB
Pure Red#FF000025500
Pure Green#00FF0002550
Pure Blue#0000FF00255
50% Red#80000012700
50% Green#00800001270
50% Blue#00008000127
Black#000000000
White#FFFFFF255255255

Since each color has a range of 0 through 255, (a total of 256 "values" including "0"), you can multiply 256 x 256 x 256 to get a total of 16,777,216 (colors).

This is why hardware or software is commonly described with capability of "16 Million Colors", which simply means it can display "RGB".

Another way to reference colors in HTML is to simply use the name of the color.

Many basic color names will work, including the traditional colors of the rainbow, (Red, Orange, Yellow, Green, Blue, Indigo and Violet).

Here's ole Roy G. Biv, (the name is a way to remember the colors of the rainbow; "R" is for Red, "O" is for Orange, and so on)...

Red
#FF0000


Orange
#FFA500


Yellow
#FFFF00


Green
#008000


Blue
#0000FF


Indigo
#4B0082


Violet
#EE82EE


If you see the seven different colors, (below), and they appear exactly as the colors in the rainbow above, (which uses RGB values in the code), then your browser correctly interprets colors by name when used in HTML.

Red Orange Yellow Green Blue Indigo Violet


###




Home | Site Map | Links | Email Us

• eCommerce Websites • Shopping Carts • Online Stores •
• Web Design • Photoshop • Logo Design • Custom Programming •
• SEO • SEM • PPC • Display Ads • Solutions! •

Contact: Randy Harris (774) 279-6731
Framingham, MA (USA)

Copyright ©2003-2010 LEXIPIXEL, all rights reserved.