CSS Color Keywords are predefined color names that can be used to set the color of text, background, borders, and other elements in a web page. These keywords make it easy to use colors without having to remember the hexadecimal or RGB values for each color.
There are 147 CSS Color Keywords that can be used in CSS. These keywords are case-insensitive, which means that they can be written in uppercase or lowercase letters. Some of the most commonly used CSS Color Keywords are:
Here are some examples of how to use CSS Color Keywords in CSS:
p {
color: red;
background-color: yellow;
border: 1px solid blue;
}
In the example above, the color of the text in the paragraph is set to red, the background color is set to yellow, and the border is set to 1 pixel wide and solid blue.
Here is a list of all 147 CSS Color Keywords:
aliceblue | antiquewhite | aqua | aquamarine | azure |
beige | bisque | black | blanchedalmond | blue |
blueviolet | brown | burlywood | cadetblue | chartreuse |
chocolate | coral | cornflowerblue | cornsilk | crimson |
cyan | darkblue | darkcyan | darkgoldenrod | darkgray |
darkgrey | darkgreen | darkkhaki | darkmagenta | darkolivegreen |
darkorange | darkorchid | darkred | darksalmon | darkseagreen |
darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet |
deeppink | deepskyblue | dimgray | dimgrey | dodgerblue |
firebrick | floralwhite | forestgreen | fuchsia | gainsboro |
ghostwhite | gold | goldenrod | gray | grey |
green | greenyellow | honeydew | hotpink | indianred |
indigo | ivory | khaki | lavender | lavenderblush |
lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan |
lightgoldenrodyellow | lightgray | lightgrey | lightgreen | lightpink |
lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey |
lightsteelblue | lightyellow | lime | limegreen | linen |
magenta | maroon | mediumaquamarine | mediumblue | mediumorchid |
mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise |
mediumvioletred | midnightblue | mintcream | mistyrose | moccasin |
navajowhite | navy | oldlace | olive | olivedrab |
orange | orangered | orchid | palegoldenrod | palegreen |
paleturquoise | palevioletred | papayawhip | peachpuff | peru |
pink | plum | powderblue | purple | rebeccapurple |
red | rosybrown | royalblue | saddlebrown | salmon |
sandybrown | seagreen | seashell | sienna | silver |
skyblue | slateblue | slategray | slategrey | snow |
springgreen | steelblue | tan | teal | thistle |
tomato | turquoise | violet | wheat | white |
whitesmoke | yellow | yellowgreen |
Using CSS Color Keywords can make it easier to create a consistent color scheme throughout a website. By using these predefined color names, you can ensure that the colors you use are consistent across all pages of your website.
References: