HTML Colors - W3points | w3schools | TutorialPoint | | w3school

HTML Colors

For the combination of Red, Green And Blue color values, HTML colors can be defined as a  hexadecimal notation.

The highest value that can be given to one light source is 255 and the lowest value is 0.

HTML Colors Code

The result of combining Red, Green and Blue light sources is shown by the table below

Color Color HEX Volor 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)

W3C Standard Color Names

16 color names have been listed by W3C that will validate with an HTML validator.

Aqua Black Blue Fuchsia
Gray Green Lime Maroon
Navy Olive Purple Red
Silver Teal White Yellow

Cross-browser Color Values

A list of 216 Web Safe Colors was suggested as a Web standard, when most computers only supported 256 different colors, some years ago. The Microsoft and Mac operating system used 40 different “reserved” fixed system colors was the reason for this.

Since most computers today have the ability to display millions of different colors, we are not sure how important is this now, but the choice is left to you.

To ensure that all computers would display the colors correctly when running a 256 color palette the 216 cross-browser color palette was created.