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
|
Primary Color |
Decimal Value |
Hexadecimal Value |
Component Colors |
Resulting Color |
|---|---|---|---|---|
| Red | 100 | 64 | ||
| Green | 100 | 64 | ||
| Blue | 255 | FF |
|
Primary Color |
Decimal Value |
Hexadecimal Value |
Component Colors |
Resulting Color |
|---|---|---|---|---|
| Red | 50 | 32 | ||
| Green | 150 | 96 | ||
| Blue | 100 | 64 |
|
Primary Color |
Decimal Value |
Hexadecimal Value |
Component Colors |
Resulting Color |
|---|---|---|---|---|
| Red | 175 | AF | ||
| Green | 200 | C8 | ||
| Blue | 225 | E1 |
Resources
- Color Tools
- Decimal <-> Hex Converter
- CSS Colors - W3Schools
- The Web-Safe Color Color Dilemma - Lynda Weinman
- More Crayons - A resource for web designers and developers
- Using Color on the Web - TRIO