Color Keywords in CSS
? Color Keywords in CSS
CSS supports named color keywords as a quick way to specify colors without using hex, rgb, or hsl codes.
What Are Color Keywords?
These are predefined color names you can directly use, like red, blue, or lightgreen.
Common Color Keywords Examples:
| Keyword | Description | Example Color |
|---|---|---|
red | Pure red | |
blue | Pure blue | |
green | Pure green | |
black | Black | |
white | White | |
yellow | Bright yellow | |
orange | Orange | |
pink | Pink | |
gray | Medium gray |
Full List of CSS Color Keywords (147 colors)
Includes basic colors, web-safe colors, and extended colors like
lightblue,darkgreen,salmon,coral,violet,goldenrod, etc.
How to Use Color Keywords
p { color: tomato; background-color: lightyellow; border: 2px solid steelblue;}Why use Color Keywords?
Easy to remember and type
Readable code (e.g.,
color: navy;is clearer thancolor: #000080;)Good for quick prototyping or simple projects
Want me to help you create a color palette or suggest how to use color keywords effectively in your design?