CSS Color Names

Original Author(s): W3C

Colors by Names


  selector {color:black}

CSS1 has the same list of color names as HTML 3.2. The text below consists of <span> elements with style attribute declarations setting the color of the text.

aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal white yellow

Colors by RGB

It is also possible to express colors using RGB values. This allows for a better control over nuance. The minimum value is 0 and the maximum value is 255 - rgb(0,0,0) represents black and rgb(255,255,255) represents white.

RGB using binary values

selector {color:rgb(100,100,100)}
 

Color Binary RGB

red

rgb(255,0,0)

orange

rgb(255,102,0)

yellow

rgb(255,255,0)

green

rgb(0,255,0)

blue

rgb(0,0,255)

indigo

rgb(51,0,255)

violet

rgb(204,0,255)

medium gray

rgb(128,128,128)

dark gray

rgb(51,51,51)

tan

rgb(255,204,153)

gold

rgb(255,204,0)

purple

rgb(255,0,255)

RGB using Hexadecimal

selector {color: #FF0000;}
 

Color

Hex RGB

red

#FF0000

orange

#FF6600

yellow

#FFFF00

green

#00FF00

blue

#0000FF

indigo

#3300FF

violet

#CC00FF

medium gray

#808080

dark gray

#333333

tan

#FFCC99

gold

#FFCC00

purple

#FF00FF

RGB using percentage

selector {color:rgb(50%,50%,50%)}

References

DAISYpedia Categories: 


This page was last edited by on Tuesday, August 10, 2010 15:25
Text is available under the terms of the DAISY Consortium Intellectual Property Policy, Licensing, and Working Group Process.