When coding HTML, you often need to specify what color an element should be. For example, the color of text, the background color of a table cell etc. For any given color, there are various ways of specifying a value.
Using hex color codes (and various other models), you have many more options for different shades of color than just the color names. Instead of just "blue" you can nominate a specific shade of blue using a hexadecimal value.
HTML colors are defined using a hexadecimal notation (HEX) for the combination of Red, Green, and Blue color values (RGB).The lowest value that can be given to one of the light sources is 0 (in HEX: 00). The highest value is 255 (in HEX: FF).HEX values are specified as 3 pairs of two-digit numbers, starting with a # sign.
Here are the different colors with their Hexadecimal values and RGB Values............
Color Values
Color | Color HEX | Color RGB |
---|---|---|
#000000 | rgb(0,0,0) | |
#FF0000 | rgb(255,0,0) | |
#00FF00 | rgb(0,255,0) | |
#0000FF | rgb(0,0,255) | |
#FFFF00 | rgb(255,255,0) | |
#00FFFF | rgb(0,255,255) | |
#FF00FF | rgb(255,0,255) | |
#C0C0C0 | rgb(192,192,192) | |
#FFFFFF | rgb(255,255,255) |
Post a Comment