Forums > Web, Print & Media Design > Numerical Color Values
|
Numerical Color Values
The RGB model is used in numerical color specifications. The format of a RGB value in Hexadecimal notation is a # followed immediately by either three or 6 hexadecimal characters.
The expansion from a 3 digit code to a 6 digit code is done by replicating digits, not by adding zeros.
The 3 or 6 digits correspond to RGB values, the first 1 or two to the red value, the second to the green value and the third to the blue value.
Example:
#f00 = #ff0000
FF0000 is plain red, whereas we have the red value set to FF, the Green value to 00 and the Blue value to 00 as well.
The base values for Red Green and Blue are:
FF0000 = red
00FF00 = green
0000FF = blue
It means that on red , there is only red color and no green and blue mixed in. By increasing the blue value, you go towards purple.
If you understand this concept, then you understand the basics about how colors are defined.
RGB values are expressed in numbers from 0 to 255. Thus, f00 (or ff0000) means also red 255, green 0 and blue 0.
These RGB values can also be used in our style-sheet, expressed in either absolute numbers, like 255 for plain red, or in relative percentages, in this case 100% for 255.
This allows us to write color codes in different ways; the below expressions define all the same color:
Example 2
em {color: #f00;}
em {color: #FF0000;}
em {color: 255,0,0;}
em {color: 100%, 0%, 0%}
|
| Build a web site | Website Management Technology | Website Services |
|
|
|
|
| Website CMS Solutions | Website CMS Applications | |
|
|
|
|
| Business Opportunities | Customer Service | Company |
|
|
|
|
Website design by AJIBOYE. Website powered by ASD Website Automation CMS+ v. 3.06.00
© Copyright. AJIBOYE. All rights reserved