Understanding the relationship between RGB and Hexadecimal

Views:
2328
Comments:
0 Posted:
1-26-2007

based on
1 votes.
Introduction
When coding in CSS and a lot of times in HTML as well, we find ourselves using special color codes. The two most commonly used color codes in HTML/CSS are Hexadecimal and RGB. In this tutorial, we will cover what the relationship between the two is, and how to convert from one to the other.
RGB and Hexadecimal Color values are very similar. They both work the same way by creating a color based on 3 values - Reds, Greens, and Blues. We will work with a very easy example:
#FF0000 = Red = rgb( 255, 0, 0 )
The next page will cover the basics of the hexadecimal system.