Adding colors to web pages is relatively simple. Each color code assigned
to it with a number sign in front of it. This code is at Hexadecimal (Hex) Triplet value.
Instead of using a number system that goes from 0 to 9. Hex uses a system that starts with
0 goes to 9 and then from A-F. This allows one digit to stand for 16 values instead of just ten.
There are 16 basic color names that all versions of HTML recognize. Shown below are
the color name, RGB Triplet and the corresponding hexadecimal representation.
Color Name |
RGB Triplet |
Hexadecimal |
Aqua |
( 0, 255, 255 ) |
00ffff |
Black |
( 0, 0, 0 ) |
000000 |
Blue |
( 0, 0, 255 ) |
0000ff |
Fuchsia |
( 255, 0, 255 ) |
ff00ff |
Gray |
( 128, 128, 128 ) |
808080 |
Green |
( 0, 128, 0 ) |
008000 |
Lime |
( 0, 255, 0 ) |
00ff00 |
Maroon |
( 128, 0, 0 ) |
800000 |
Navy |
( 0, 0, 128 ) |
000080 |
Olive |
( 128, 128, 0 ) |
808000 |
Purple |
( 128, 0, 128 ) |
800080 |
Red |
( 255, 0, 0 ) |
ffff00 |
Silver |
( 192, 192, 192 ) |
c0c0c0 |
Teal |
( 0, 128, 128 ) |
008080 |
White |
( 255, 255, 255 ) |
ffffff |
Yellow |
( 255, 255, 0 ) |
ffff00 |