Office of Information Technology Office of Information Technology Susquehanna University Susquehanna University Office of Information Technology

Director's OfficeTechnology Support ServicesAdvanced TechnologiesTechnical OperationsAdministrative Information Services

RGB Color Model

The standard color model used on the Internet is RGB, which takes the form of #RRGGBB where each letter, or digit, represents a hexadecimal digit.

A hexadecimal digit is a single number "0" (representing zero) to "9" (representing 9) and "A" (representing 10) to "F" (representing 15). Counting is strange, but completely understandable to your computer.

Decimal0123456789101112131415161718192021...
Hexadecimal0123456789ABCDEF101112131415...

The six digit RGB Color Model code is divided into 3 pairs of hexadecimal digits, which represent 0 (zero) to FF (255).

The first pair denotes the amount of red (RR) used, the second pair denotes the amount of green (GG) used, and the last pair denotes the amount of blue (BB) used with 0 (zero) representing the least amount of each color and FF (255) representing the maximum amount of each color.

 
#000000

Therefore, if you have an RGB Color Model code of #000000, you then have black, the absence of color.

 
#FFFFFF

And if you have an RGB Color Model code of #FFFFFF, you then have white, all colors combined.

Conveniently, if the three pairs of hexadecimal digits are identical, varying shades of gray are produced.

           
#333333 #4B4B4B #666666 #7C7C7C #CCCCCC #DFDFDF

In order to get out of grayscale, one of the pairs must be different than the other two.

     
#FF0000 #00FF00 #0000FF

These are the three primary colors of light, red, green, and blue. This differs from the three primary colors of pigment, red, yellow, and blue, that you learned in elementary school art class.

By mixing them, you can achieve a virtually unlimited array of colors.

  +   =  
#FF0000 #00FF00 #FFFF00

  +   =  
#FF0000 #0000FF #FF00FF

  +   =  
#00FF00 #0000FF #0000FF

As you can see, yellow is made from a mixture of red and green. Magenta is made from red and blue and cyan is made from green and blue. The color wheel looks much like this:

Color Wheel

Any color you can imagine can be obtained through the RGB color model. The only problem is, your computer or browser may not be able to display all the colors you can imagine.

More information: