Two ways to specify colors in HTML:
Color codes are specified as intensity values in hexadecimal notation (base 16):
D72EB5 | ||
D7 | 2E | B5 |
Red | Green | Blue |
---|
= (215, 46, 181)
Color name | RGB triplet | Hexadecimal | Color name | RGB triplet | Hexadecimal |
---|---|---|---|---|---|
Aqua | (0, 255, 255) | 00FFFF | Navy | (0, 0, 128) | 000080 |
Black | (0, 0, 0) | 000000 | Olive | (128, 128, 0) | 808000 |
Blue | (0, 0, 255) | 0000FF | Purple | (128, 0, 128) | 800080 |
Fuchsia | (255, 0, 255) | FF00FF | Red | (255, 0, 0) | FF0000 |
Gray | (128, 128, 128) | 808080 | Silver | (192, 192, 192) | C0C0C0 |
Green | (0, 128, 0) | 008000 | Teal | (0, 128, 128) | 008080 |
Lime | (0, 255, 0) | 00FF00 | White | (255, 255, 255) | FFFFFF |
Maroon | (128, 0, 0) | 800000 | Yellow | (255, 255, 0) | FFFF00 |
Total possible colors = 256 × 256 × 256 = 16,777,216 ("24-bit color")