Color Names
In HTML, a color will be indicated using a color name:
Example
Color | Name |
---|---|
Red | |
Orange | |
Yellow | |
Cyan | |
Blue |
HTML has the ability to support 140 standard color names.
Example
Color | RGB |
---|---|
rgb(255,0,0) | |
rgb(255,255,0) | |
rgb(0,255,0) | |
rgb(0,255,255) | |
rgb(0,0,255) |
Shades of gray are usually mentioned by equal values with respect to all the 3 light sources:
Example
Color | RGB |
---|---|
rgb(0,0,0) | |
rgb(90,90,90) | |
rgb(128,128,128) | |
rgb(200,200,200) | |
rgb(255,255,255) |
HEX Value
In HTML, a color can also be mentioned by a hexadecimal value in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are found to be hexadecimal values between 00 and FF (same as decimal 0-255).
For example, #FF0000 is being shown as red, as red is set to have its highest value (FF) and the others are set to have the lowest value (00).
Shades of gray are usually mentioned by equal values with respect to all the 3 light sources: