Color

Colors are specified by either using a keyword or a six digit code.

Color Names

Recent browsers recognize many color names.

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

Color Code

You can also specify colors by using a six digit code. This code is actually three two-digit hexadecimal values for red, green, and blue, respectively. The hexadecimal values range from 00 to FF (the equivalent of 0 to 255 in decimal).

Red
Green
Blue
  Resulting
Color
51 AA F8    

Examples of Use


<body style="background: #51AAF8">

<p style="border: solid 3px #51AAF8">Cogito Ergo Sum</p>

Additive Color Examples



Example One: Robin's Egg Blue
Primary
Color
Decimal
Value
Hexadecimal
Value
Component
Colors
Resulting
Color
Red 100 64    
Green 100 64  
Blue 255 FF  


Example Two: Loden Green
Primary
Color
Decimal
Value
Hexadecimal
Value
Component
Colors
Resulting
Color
Red 50 32    
Green 150 96  
Blue 100 64  


Example Three: Bluish Gray
Primary
Color
Decimal
Value
Hexadecimal
Value
Component
Colors
Resulting
Color
Red 175 AF    
Green 200 C8  
Blue 225 E1  

Resources