CSS can be thanked for making our web pages look good. Choosing the right color can sometimes be a challenge, especially if you’re not a graphic designer. With the three primary colors of red, green, and blue, we can come up with 16,777,216 million unique colors.
If you’ve worked with CSS colors to change the text or background color of an element on a page you’ve likely used hexadecimal or rgb values that represent a specific color. For example, to set the text color on a page to black you might do something like:
or perhaps:
body {
color: rgb(0, 0, 0);
}
But did you know that practically all browsers support a list of named colors that you can use in your CSS? That’s right, there are 147 named CSS colors that you can safely use to style your pages. The full list of named colors, alongside their accompanying HEX and RGB values, are provided below.
How to use Named Colors in CSS
To use a named color in CSS, you simply replace the HEX or RGB value with the named value. For example, if you wanted the text color to be the color green, you could do:
Or mix it up with one of the many named green variations like:
body {
color: darkseagreen;
}
body {
color: forestgreen;
}
body {
color: seagreen;
}
Here is a list of all 147 named CSS colors. Note that while there are 147 unique names, some colors like gray
and grey
act as aliases and represent the same underlying RGB color code.
Aliceblue
Keyword | HEX | RGB | Output |
---|
aliceblue | #F0F8FF | rgb(240, 248, 255) | |
Antiquewhite
Keyword | HEX | RGB | Output |
---|
antiquewhite | #FAEBD7 | rgb(250, 235, 215) | |
Aqua / Cyan
Keyword | HEX | RGB | Output |
---|
aqua | #00FFFF | rgb(0, 255, 255) | |
cyan | #00FFFF | rgb(0, 255, 255) | |
Aquamarine
Keyword | HEX | RGB | Output |
---|
aquamarine | #7FFFD4 | rgb(127, 255, 212) | |
Azure
Keyword | HEX | RGB | Output |
---|
azure | #F0FFFF | rgb(240, 255, 255) | |
Beige
Keyword | HEX | RGB | Output |
---|
beige | #F5F5DC | rgb(245, 245, 220) | |
Bisque
Keyword | HEX | RGB | Output |
---|
bisque | #FFE4C4 | rgb(255, 228, 196) | |
Black
Keyword | HEX | RGB | Output |
---|
black | #000000 | rgb(0, 0, 0) | |
Blanchedalmond
Keyword | HEX | RGB | Output |
---|
blanchedalmond | #FFEBCD | rgb(255, 235, 205) | |
Blue
Keyword | HEX | RGB | Output |
---|
blue | #0000FF | rgb(0, 0, 255) | |
Blueviolet
Keyword | HEX | RGB | Output |
---|
blueviolet | #8A2BE2 | rgb(138, 43, 226) | |
Brown
Keyword | HEX | RGB | Output |
---|
brown | #A52A2A | rgb(165, 42, 42) | |
Burlywood
Keyword | HEX | RGB | Output |
---|
burlywood | #DEB887 | rgb(222, 184, 135) | |
Cadetblue
Keyword | HEX | RGB | Output |
---|
cadetblue | #5F9EA0 | rgb(95, 158, 160) | |
Chartreuse
Keyword | HEX | RGB | Output |
---|
chartreuse | #7FFF00 | rgb(127, 255, 0) | |
Chocolate
Keyword | HEX | RGB | Output |
---|
chocolate | #D2691E | rgb(210, 105, 30) | |
Coral
Keyword | HEX | RGB | Output |
---|
coral | #FF7F50 | rgb(255, 127, 80) | |
Cornflowerblue
Keyword | HEX | RGB | Output |
---|
cornflowerblue | #6495ED | rgb(100, 149, 237) | |
Cornsilk
Keyword | HEX | RGB | Output |
---|
cornsilk | #FFF8DC | rgb(255, 248, 220) | |
Crimson
Keyword | HEX | RGB | Output |
---|
crimson | #DC143C | rgb(220, 20, 60) | |
Darkblue
Keyword | HEX | RGB | Output |
---|
darkblue | #00008B | rgb(0, 0, 139) | |
Darkcyan
Keyword | HEX | RGB | Output |
---|
darkcyan | #008B8B | rgb(0, 139, 139) | |
Darkgoldenrod
Keyword | HEX | RGB | Output |
---|
darkgoldenrod | #B8860B | rgb(184, 134, 11) | |
Darkgray / Darkgrey
Keyword | HEX | RGB | Output |
---|
darkgray | #A9A9A9 | rgb(169, 169, 169) | |
darkgrey | #A9A9A9 | rgb(169, 169, 169) | |
Darkgreen
Keyword | HEX | RGB | Output |
---|
darkgreen | #006400 | rgb(0, 100, 0) | |
Darkkhaki
Keyword | HEX | RGB | Output |
---|
darkkhaki | #BDB76B | rgb(189, 183, 107) | |
Darkmagenta
Keyword | HEX | RGB | Output |
---|
darkmagenta | #8B008B | rgb(139, 0, 139) | |
Darkolivegreen
Keyword | HEX | RGB | Output |
---|
darkolivegreen | #556B2F | rgb(85, 107, 47) | |
Darkorange
Keyword | HEX | RGB | Output |
---|
darkorange | #FF8C00 | rgb(255, 140, 0) | |
Darkorchid
Keyword | HEX | RGB | Output |
---|
darkorchid | #9932CC | rgb(153, 50, 204) | |
Darkred
Keyword | HEX | RGB | Output |
---|
darkred | #8B0000 | rgb(139, 0, 0) | |
Darksalmon
Keyword | HEX | RGB | Output |
---|
darksalmon | #E9967A | rgb(233, 150, 122) | |
Darkseagreen
Keyword | HEX | RGB | Output |
---|
darkseagreen | #8FBC8F | rgb(143, 188, 143) | |
Darkslateblue
Keyword | HEX | RGB | Output |
---|
darkslateblue | #483D8B | rgb(72, 61, 139) | |
Darkslategray / Darkslategrey
Keyword | HEX | RGB | Output |
---|
darkslategray | #2F4F4F | rgb(47, 79, 79) | |
darkslategrey | #2F4F4F | rgb(47, 79, 79) | |
Darkturquoise
Keyword | HEX | RGB | Output |
---|
darkturquoise | #00CED1 | rgb(0, 206, 209) | |
Darkviolet
Keyword | HEX | RGB | Output |
---|
darkviolet | #9400D3 | rgb(148, 0, 211) | |
Deeppink
Keyword | HEX | RGB | Output |
---|
deeppink | #FF1493 | rgb(255, 20, 147) | |
Deepskyblue
Keyword | HEX | RGB | Output |
---|
deepskyblue | #00BFFF | rgb(0, 191, 255) | |
Dimgray / Dimgrey
Keyword | HEX | RGB | Output |
---|
dimgray | #696969 | rgb(105, 105, 105) | |
dimgrey | #696969 | rgb(105, 105, 105) | |
Dodgerblue
Keyword | HEX | RGB | Output |
---|
dodgerblue | #1E90FF | rgb(30, 144, 255) | |
Firebrick
Keyword | HEX | RGB | Output |
---|
firebrick | #B22222 | rgb(178, 34, 34) | |
Floralwhite
Keyword | HEX | RGB | Output |
---|
floralwhite | #FFFAF0 | rgb(255, 250, 240) | |
Forestgreen
Keyword | HEX | RGB | Output |
---|
forestgreen | #228B22 | rgb(34, 139, 34) | |
Fuchsia / Magenta
Keyword | HEX | RGB | Output |
---|
fuchsia | #FF00FF | rgb(255, 0, 255) | |
magenta | #FF00FF | rgb(255, 0, 255) | |
Gainsboro
Keyword | HEX | RGB | Output |
---|
gainsboro | #DCDCDC | rgb(220, 220, 220) | |
Ghostwhite
Keyword | HEX | RGB | Output |
---|
ghostwhite | #F8F8FF | rgb(248, 248, 255) | |
Gold
Keyword | HEX | RGB | Output |
---|
gold | #FFD700 | rgb(255, 215, 0) | |
Goldenrod
Keyword | HEX | RGB | Output |
---|
goldenrod | #DAA520 | rgb(218, 165, 32) | |
Greenyellow
Keyword | HEX | RGB | Output |
---|
greenyellow | #ADFF2F | rgb(173, 255, 47) | |
Gray / Grey
Keyword | HEX | RGB | Output |
---|
gray | #808080 | rgb(128, 128, 128) | |
grey | #808080 | rgb(128, 128, 128) | |
Green
Keyword | HEX | RGB | Output |
---|
green | #008000 | rgb(0, 128, 0) | |
Honeydew
Keyword | HEX | RGB | Output |
---|
honeydew | #F0FFF0 | rgb(240, 255, 240) | |
Hotpink
Keyword | HEX | RGB | Output |
---|
hotpink | #FF69B4 | rgb(255, 105, 180) | |
Indianred
Keyword | HEX | RGB | Output |
---|
indianred | #CD5C5C | rgb(205, 92, 92) | |
Indigo
Keyword | HEX | RGB | Output |
---|
indigo | #4B0082 | rgb(75, 0, 130) | |
Ivory
Keyword | HEX | RGB | Output |
---|
ivory | #FFFFF0 | rgb(255, 255, 240) | |
Khaki
Keyword | HEX | RGB | Output |
---|
khaki | #F0E68C | rgb(240, 230, 140) | |
Lavender
Keyword | HEX | RGB | Output |
---|
lavender | #E6E6FA | rgb(230, 230, 250) | |
Lavenderblush
Keyword | HEX | RGB | Output |
---|
lavenderblush | #FFF0F5 | rgb(255, 240, 245) | |
Lawngreen
Keyword | HEX | RGB | Output |
---|
lawngreen | #7CFC00 | rgb(124, 252, 0) | |
Lemonchiffon
Keyword | HEX | RGB | Output |
---|
lemonchiffon | #FFFACD | rgb(255, 250, 205) | |
Lightblue
Keyword | HEX | RGB | Output |
---|
lightblue | #ADD8E6 | rgb(173, 216, 230) | |
Lightcoral
Keyword | HEX | RGB | Output |
---|
lightcoral | #F08080 | rgb(240, 128, 128) | |
Lightcyan
Keyword | HEX | RGB | Output |
---|
lightcyan | #E0FFFF | rgb(224, 255, 255) | |
Lightgoldenrodyellow
Keyword | HEX | RGB | Output |
---|
lightgoldenrodyellow | #FAFAD2 | rgb(250, 250, 210) | |
Lightgray / Lightgrey
Keyword | HEX | RGB | Output |
---|
lightgray | #D3D3D3 | rgb(211, 211, 211) | |
lightgrey | #D3D3D3 | rgb(211, 211, 211) | |
Lightgreen
Keyword | HEX | RGB | Output |
---|
lightgreen | #90EE90 | rgb(144, 238, 144) | |
Lightpink
Keyword | HEX | RGB | Output |
---|
lightpink | #FFB6C1 | rgb(255, 182, 193) | |
Lightsalmon
Keyword | HEX | RGB | Output |
---|
lightsalmon | #FFA07A | rgb(255, 160, 122) | |
Lightseagreen
Keyword | HEX | RGB | Output |
---|
lightseagreen | #20B2AA | rgb(32, 178, 170) | |
Lightskyblue
Keyword | HEX | RGB | Output |
---|
lightskyblue | #87CEFA | rgb(135, 206, 250) | |
Lightslategray / Lightslategrey
Keyword | HEX | RGB | Output |
---|
lightslategray | #778899 | rgb(119, 136, 153) | |
lightslategrey | #778899 | rgb(119, 136, 153) | |
Lightyellow
Keyword | HEX | RGB | Output |
---|
lightyellow | #FFFFE0 | rgb(255, 255, 224) | |
Lime
Keyword | HEX | RGB | Output |
---|
lime | #00FF00 | rgb(0, 255, 0) | |
Limegreen
Keyword | HEX | RGB | Output |
---|
limegreen | #32CD32 | rgb(50, 205, 50) | |
Linen
Keyword | HEX | RGB | Output |
---|
linen | #FAF0E6 | rgb(250, 240, 230) | |
Maroon
Keyword | HEX | RGB | Output |
---|
maroon | #800000 | rgb(128, 0, 0) | |
Mediumaquamarine
Keyword | HEX | RGB | Output |
---|
mediumaquamarine | #66CDAA | rgb(102, 205, 170) | |
Mediumblue
Keyword | HEX | RGB | Output |
---|
mediumblue | #0000CD | rgb(0, 0, 205) | |
Mediumorchid
Keyword | HEX | RGB | Output |
---|
mediumorchid | #BA55D3 | rgb(186, 85, 211) | |
Mediumpurple
Keyword | HEX | RGB | Output |
---|
mediumpurple | #9370DB | rgb(147, 112, 219) | |
Mediumseagreen
Keyword | HEX | RGB | Output |
---|
mediumseagreen | #3CB371 | rgb(60, 179, 113) | |
Mediumslateblue
Keyword | HEX | RGB | Output |
---|
mediumslateblue | #7B68EE | rgb(123, 104, 238) | |
Mediumspringgreen
Keyword | HEX | RGB | Output |
---|
mediumspringgreen | #00FA9A | rgb(0, 250, 154) | |
Mediumturquoise
Keyword | HEX | RGB | Output |
---|
mediumturquoise | #48D1CC | rgb(72, 209, 204) | |
Mediumvioletred
Keyword | HEX | RGB | Output |
---|
mediumvioletred | #C71585 | rgb(199, 21, 133) | |
Midnightblue
Keyword | HEX | RGB | Output |
---|
midnightblue | #191970 | rgb(25, 25, 112) | |
Mintcream
Keyword | HEX | RGB | Output |
---|
mintcream | #F5FFFA | rgb(245, 255, 250) | |
Mistyrose
Keyword | HEX | RGB | Output |
---|
mistyrose | #FFE4E1 | rgb(255, 228, 225) | |
Moccasin
Keyword | HEX | RGB | Output |
---|
moccasin | #FFE4B5 | rgb(255, 228, 181) | |
Navajowhite
Keyword | HEX | RGB | Output |
---|
navajowhite | #FFDEAD | rgb(255, 222, 173) | |
Navy
Keyword | HEX | RGB | Output |
---|
navy | #000080 | rgb(0, 0, 128) | |
Oldlace
Keyword | HEX | RGB | Output |
---|
oldlace | #FDF5E6 | rgb(253, 245, 230) | |
Olive
Keyword | HEX | RGB | Output |
---|
olive | #808000 | rgb(128, 128, 0) | |
Olivedrab
Keyword | HEX | RGB | Output |
---|
olivedrab | #6B8E23 | rgb(107, 142, 35) | |
Orange
Keyword | HEX | RGB | Output |
---|
orange | #FFA500 | rgb(255, 165, 0) | |
Orangered
Keyword | HEX | RGB | Output |
---|
orangered | #FF4500 | rgb(255, 69, 0) | |
Orchid
Keyword | HEX | RGB | Output |
---|
orchid | #DA70D6 | rgb(218, 112, 214) | |
Palegoldenrod
Keyword | HEX | RGB | Output |
---|
palegoldenrod | #EEE8AA | rgb(238, 232, 170) | |
Palegreen
Keyword | HEX | RGB | Output |
---|
palegreen | #98FB98 | rgb(152, 251, 152) | |
Paleturquoise
Keyword | HEX | RGB | Output |
---|
paleturquoise | #AFEEEE | rgb(175, 238, 238) | |
Palevioletred
Keyword | HEX | RGB | Output |
---|
palevioletred | #DB7093 | rgb(219, 112, 147) | |
Papayawhip
Keyword | HEX | RGB | Output |
---|
papayawhip | #FFEFD5 | rgb(255, 239, 213) | |
Peachpuff
Keyword | HEX | RGB | Output |
---|
peachpuff | #FFDAB9 | rgb(255, 218, 185) | |
Peru
Keyword | HEX | RGB | Output |
---|
peru | #CD853F | rgb(205, 133, 63) | |
Pink
Keyword | HEX | RGB | Output |
---|
pink | #FFC0CB | rgb(255, 192, 203) | |
Plum
Keyword | HEX | RGB | Output |
---|
plum | #DDA0DD | rgb(221, 160, 221) | |
Powderblue
Keyword | HEX | RGB | Output |
---|
powderblue | #B0E0E6 | rgb(176, 224, 230) | |
Purple
Keyword | HEX | RGB | Output |
---|
purple | #800080 | rgb(128, 0, 128) | |
Rebeccapurple
Keyword | HEX | RGB | Output |
---|
rebeccapurple | #663399 | rgb(102, 51, 153) | |
Red
Keyword | HEX | RGB | Output |
---|
red | #FF0000 | rgb(255, 0, 0) | |
Rosybrown
Keyword | HEX | RGB | Output |
---|
rosybrown | #BC8F8F | rgb(188, 143, 143) | |
Royalblue
Keyword | HEX | RGB | Output |
---|
royalblue | #4169E1 | rgb(65, 105, 225) | |
Saddlebrown
Keyword | HEX | RGB | Output |
---|
saddlebrown | #8B4513 | rgb(139, 69, 19) | |
Salmon
Keyword | HEX | RGB | Output |
---|
salmon | #FA8072 | rgb(250, 128, 114) | |
Sandybrown
Keyword | HEX | RGB | Output |
---|
sandybrown | #F4A460 | rgb(244, 164, 96) | |
Seagreen
Keyword | HEX | RGB | Output |
---|
seagreen | #2E8B57 | rgb(46, 139, 87) | |
Seashell
Keyword | HEX | RGB | Output |
---|
seashell | #FFF5EE | rgb(255, 245, 238) | |
Sienna
Keyword | HEX | RGB | Output |
---|
sienna | #A0522D | rgb(160, 82, 45) | |
Silver
Keyword | HEX | RGB | Output |
---|
silver | #C0C0C0 | rgb(192, 192, 192) | |
Skyblue
Keyword | HEX | RGB | Output |
---|
skyblue | #87CEEB | rgb(135, 206, 235) | |
Slateblue
Keyword | HEX | RGB | Output |
---|
slateblue | #6A5ACD | rgb(106, 90, 205) | |
Slategray / Slategrey
Keyword | HEX | RGB | Output |
---|
slategray | #708090 | rgb(112, 128, 144) | |
slategrey | #708090 | rgb(112, 128, 144) | |
Snow
Keyword | HEX | RGB | Output |
---|
snow | #FFFAFA | rgb(255, 250, 250) | |
Springgreen
Keyword | HEX | RGB | Output |
---|
springgreen | #00FF7F | rgb(0, 255, 127) | |
Steelblue
Keyword | HEX | RGB | Output |
---|
steelblue | #4682B4 | rgb(70, 130, 180) | |
Tan
Keyword | HEX | RGB | Output |
---|
tan | #D2B48C | rgb(210, 180, 140) | |
Teal
Keyword | HEX | RGB | Output |
---|
teal | #008080 | rgb(0, 128, 128) | |
Thistle
Keyword | HEX | RGB | Output |
---|
thistle | #D8BFD8 | rgb(216, 191, 216) | |
Tomato
Keyword | HEX | RGB | Output |
---|
tomato | #FF6347 | rgb(255, 99, 71) | |
Turquoise
Keyword | HEX | RGB | Output |
---|
turquoise | #40E0D0 | rgb(64, 224, 208) | |
Violet
Keyword | HEX | RGB | Output |
---|
violet | #EE82EE | rgb(238, 130, 238) | |
Wheat
Keyword | HEX | RGB | Output |
---|
wheat | #F5DEB3 | rgb(245, 222, 179) | |
White
Keyword | HEX | RGB | Output |
---|
white | #FFFFFF | rgb(255, 255, 255) | |
Whitesmoke
Keyword | HEX | RGB | Output |
---|
whitesmoke | #F5F5F5 | rgb(245, 245, 245) | |
Yellow
Keyword | HEX | RGB | Output |
---|
yellow | #FFFF00 | rgb(255, 255, 0) | |
Yellowgreen
Keyword | HEX | RGB | Output |
---|
yellowgreen | #9ACD32 | rgb(154, 205, 50) | |
Summary
There we have it, all 147 named CSS colors in on one handy page. Remember that for each of the named colors you can use its HEX or RGB equivalent to get the same exact color. What you decide to use is totally up to you.
Personally, I prefer to use HEX codes across my entire app to keep everything consistent, but if you’re not a designer and just want a good ballpark color scheme, using many of the named CSS colors is a great alternative.
Happy hacking.