CSS Color Names
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)}
|
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;}
|
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
Text is available under the terms of the DAISY Consortium Intellectual Property Policy, Licensing, and Working Group Process.
- © 2012 DAISY Consortium. All Rights Reserved.