What does the hexadecimal that represents a CSS color mean? How can I tell what color it is without memorizing the exact code? Does it have any relationships with RGB (and C
According to http://quashnick.net/geek_stuff/HEX2DEC.html
A Hexadecimal color value represents the Red Green Blue color (each uses 1 Byte). RGB is in decimal value for example RGB(255, 255, 255) but the Hex color code is in Hexadecimal format #FFFFFF ->(R) FF- (G) FF- (B) FF
HEX numbers are composed of digits 0 through 9 like DEC but also adds A-F. So when counting in HEX: HEX 0 1 2 3 4 5 6 7 8 9 A B C D E F
DEC 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Here is a HEX number: 1E5DF
To convert this to a DEC, we need to define the base for our power function. Since HEX is based on 16 different digits [0-9A-F], our base is 16.
To convert from HEX to DEC, follow these steps: We know that F = 15 in DEC so we use this formula (15*16^0) = 15
We know that D = 13 in DEC so we use this formula (13*16^1) = 208
We know that 5 = 5 in DEC so we use this formula (5*16^2) = 1280
We know that E = 14 in DEC so we use this formula (14*16^3) = 57344
We know that 1 = 1 in DEC so we use this formula (1*16^4) = 65536Now we add all of the numbers together to get the DEC number for HEX number 1E5DF:
15 + 208 + 1280 + 57344 + 65536 = 124383So our answer is HEX 1E5DF = DEC 124383
Read more at: http://quashnick.net/geek_stuff/HEX2DEC.html
Know more about colors at: http://www.w3schools.com/html/html_colors.asp