CSS3: The coding language for styling web pages
Sat May 9 6:28 pm EDT 2026xtmci@atomicmail.io
Table of Contents
Specifying colors in CSS3
There are three ways for specifying colors in CSS3 syntax:
- A hex value such as
#FF0000and#808080. - An RGB value such as
rgb(255,0,0)andrgb(128,128,128). - A color keyword such as
redandgray.
The CSS3 color code list
The list of most popular colors for web design is shown below:
| Keyword | Hex value | RGB value | Color |
|---|---|---|---|
black | #000000 | rgb(0,0,0) | |
navy | #000080 | rgb(0,0,128) | |
blue | #0000ff | rgb(0,0,255) | |
green | #008000 | rgb(0,128,0) | |
teal | #008080 | rgb(0,128,128) | |
lime | #00ff00 | rgb(0,255,0) | |
cyan | #00ffff | rgb(0,255,255) | |
maroon | #800000 | rgb(128,0,0) | |
purple | #800080 | rgb(128,0,128) | |
olive | #808000 | rgb(128,128,0) | |
gray | #808080 | rgb(128,128,128) | |
red | #ff0000 | rgb(255,0,0) | |
magenta | #ff00ff | rgb(255,0,255) | |
yellow | #ffff00 | rgb(255,255,0) | |
white | #ffffff | rgb(255,255,255) |