CSS Named Colors
All 148 CSS colour keywords with HEX, RGB and HSL values and a WCAG contrast rating for each — plus why gray is darker than darkgray.
All 148 named colours
CSS defines 148 colour keywords. They are case-insensitive, work anywhere a colour is accepted, and are exactly equivalent to their hex values — tomato and #FF6347 are the same colour to the browser.
The final column shows the best contrast ratio achievable against pure black or pure white text, which tells you at a glance whether the colour can carry text. Green means it meets WCAG AA for body text (4.5:1), amber means large text only (3:1), red means neither.
| Name | HEX | RGB | HSL | Best text contrast | |
|---|---|---|---|---|---|
| aliceblue | #F0F8FF | 240, 248, 255 | 208, 100%, 97% | 19.6:1 black text | |
| antiquewhite | #FAEBD7 | 250, 235, 215 | 34, 78%, 91% | 17.9:1 black text | |
| aqua | #00FFFF | 0, 255, 255 | 180, 100%, 50% | 16.7:1 black text | |
| aquamarine | #7FFFD4 | 127, 255, 212 | 160, 100%, 75% | 17.2:1 black text | |
| azure | #F0FFFF | 240, 255, 255 | 180, 100%, 97% | 20.5:1 black text | |
| beige | #F5F5DC | 245, 245, 220 | 60, 56%, 91% | 19.0:1 black text | |
| bisque | #FFE4C4 | 255, 228, 196 | 33, 100%, 88% | 17.1:1 black text | |
| black | #000000 | 0, 0, 0 | 0, 0%, 0% | 21.0:1 white text | |
| blanchedalmond | #FFEBCD | 255, 235, 205 | 36, 100%, 90% | 18.0:1 black text | |
| blue | #0000FF | 0, 0, 255 | 240, 100%, 50% | 8.6:1 white text | |
| blueviolet | #8A2BE2 | 138, 43, 226 | 271, 76%, 53% | 6.0:1 white text | |
| brown | #A52A2A | 165, 42, 42 | 0, 59%, 41% | 7.1:1 white text | |
| burlywood | #DEB887 | 222, 184, 135 | 34, 57%, 70% | 11.3:1 black text | |
| cadetblue | #5F9EA0 | 95, 158, 160 | 182, 25%, 50% | 6.9:1 black text | |
| chartreuse | #7FFF00 | 127, 255, 0 | 90, 100%, 50% | 16.2:1 black text | |
| chocolate | #D2691E | 210, 105, 30 | 25, 75%, 47% | 5.8:1 black text | |
| coral | #FF7F50 | 255, 127, 80 | 16, 100%, 66% | 8.4:1 black text | |
| cornflowerblue | #6495ED | 100, 149, 237 | 219, 79%, 66% | 7.1:1 black text | |
| cornsilk | #FFF8DC | 255, 248, 220 | 48, 100%, 93% | 19.7:1 black text | |
| crimson | #DC143C | 220, 20, 60 | 348, 83%, 47% | 5.0:1 white text | |
| cyan | #00FFFF | 0, 255, 255 | 180, 100%, 50% | 16.7:1 black text | |
| darkblue | #00008B | 0, 0, 139 | 240, 100%, 27% | 15.3:1 white text | |
| darkcyan | #008B8B | 0, 139, 139 | 180, 100%, 27% | 5.1:1 black text | |
| darkgoldenrod | #B8860B | 184, 134, 11 | 43, 89%, 38% | 6.5:1 black text | |
| darkgray | #A9A9A9 | 169, 169, 169 | 0, 0%, 66% | 8.9:1 black text | |
| darkgreen | #006400 | 0, 100, 0 | 120, 100%, 20% | 7.4:1 white text | |
| darkkhaki | #BDB76B | 189, 183, 107 | 56, 38%, 58% | 10.1:1 black text | |
| darkmagenta | #8B008B | 139, 0, 139 | 300, 100%, 27% | 8.5:1 white text | |
| darkolivegreen | #556B2F | 85, 107, 47 | 82, 39%, 30% | 5.9:1 white text | |
| darkorange | #FF8C00 | 255, 140, 0 | 33, 100%, 50% | 9.0:1 black text | |
| darkorchid | #9932CC | 153, 50, 204 | 280, 61%, 50% | 5.7:1 white text | |
| darkred | #8B0000 | 139, 0, 0 | 0, 100%, 27% | 10.0:1 white text | |
| darksalmon | #E9967A | 233, 150, 122 | 15, 72%, 70% | 9.1:1 black text | |
| darkseagreen | #8FBC8F | 143, 188, 143 | 120, 25%, 65% | 9.8:1 black text | |
| darkslateblue | #483D8B | 72, 61, 139 | 248, 39%, 39% | 9.1:1 white text | |
| darkslategray | #2F4F4F | 47, 79, 79 | 180, 25%, 25% | 8.9:1 white text | |
| darkturquoise | #00CED1 | 0, 206, 209 | 181, 100%, 41% | 10.7:1 black text | |
| darkviolet | #9400D3 | 148, 0, 211 | 282, 100%, 41% | 6.6:1 white text | |
| deeppink | #FF1493 | 255, 20, 147 | 328, 100%, 54% | 5.8:1 black text | |
| deepskyblue | #00BFFF | 0, 191, 255 | 195, 100%, 50% | 9.9:1 black text | |
| dimgray | #696969 | 105, 105, 105 | 0, 0%, 41% | 5.5:1 white text | |
| dodgerblue | #1E90FF | 30, 144, 255 | 210, 100%, 56% | 6.5:1 black text | |
| firebrick | #B22222 | 178, 34, 34 | 0, 68%, 42% | 6.7:1 white text | |
| floralwhite | #FFFAF0 | 255, 250, 240 | 40, 100%, 97% | 20.2:1 black text | |
| forestgreen | #228B22 | 34, 139, 34 | 120, 61%, 34% | 4.8:1 black text | |
| fuchsia | #FF00FF | 255, 0, 255 | 300, 100%, 50% | 6.7:1 black text | |
| gainsboro | #DCDCDC | 220, 220, 220 | 0, 0%, 86% | 15.3:1 black text | |
| ghostwhite | #F8F8FF | 248, 248, 255 | 240, 100%, 99% | 19.9:1 black text | |
| gold | #FFD700 | 255, 215, 0 | 51, 100%, 50% | 15.0:1 black text | |
| goldenrod | #DAA520 | 218, 165, 32 | 43, 74%, 49% | 9.4:1 black text | |
| gray | #808080 | 128, 128, 128 | 0, 0%, 50% | 5.3:1 black text | |
| green | #008000 | 0, 128, 0 | 120, 100%, 25% | 5.1:1 white text | |
| greenyellow | #ADFF2F | 173, 255, 47 | 84, 100%, 59% | 17.1:1 black text | |
| honeydew | #F0FFF0 | 240, 255, 240 | 120, 100%, 97% | 20.3:1 black text | |
| hotpink | #FF69B4 | 255, 105, 180 | 330, 100%, 71% | 7.9:1 black text | |
| indianred | #CD5C5C | 205, 92, 92 | 0, 53%, 58% | 5.3:1 black text | |
| indigo | #4B0082 | 75, 0, 130 | 275, 100%, 25% | 13.0:1 white text | |
| ivory | #FFFFF0 | 255, 255, 240 | 60, 100%, 97% | 20.8:1 black text | |
| khaki | #F0E68C | 240, 230, 140 | 54, 77%, 75% | 16.4:1 black text | |
| lavender | #E6E6FA | 230, 230, 250 | 240, 67%, 94% | 17.1:1 black text | |
| lavenderblush | #FFF0F5 | 255, 240, 245 | 340, 100%, 97% | 19.0:1 black text | |
| lawngreen | #7CFC00 | 124, 252, 0 | 90, 100%, 49% | 15.8:1 black text | |
| lemonchiffon | #FFFACD | 255, 250, 205 | 54, 100%, 90% | 19.8:1 black text | |
| lightblue | #ADD8E6 | 173, 216, 230 | 195, 53%, 79% | 13.7:1 black text | |
| lightcoral | #F08080 | 240, 128, 128 | 0, 79%, 72% | 8.1:1 black text | |
| lightcyan | #E0FFFF | 224, 255, 255 | 180, 100%, 94% | 19.9:1 black text | |
| lightgoldenrodyellow | #FAFAD2 | 250, 250, 210 | 60, 80%, 90% | 19.7:1 black text | |
| lightgray | #D3D3D3 | 211, 211, 211 | 0, 0%, 83% | 14.0:1 black text | |
| lightgreen | #90EE90 | 144, 238, 144 | 120, 73%, 75% | 14.8:1 black text | |
| lightpink | #FFB6C1 | 255, 182, 193 | 351, 100%, 86% | 12.7:1 black text | |
| lightsalmon | #FFA07A | 255, 160, 122 | 17, 100%, 74% | 10.6:1 black text | |
| lightseagreen | #20B2AA | 32, 178, 170 | 177, 70%, 41% | 8.0:1 black text | |
| lightskyblue | #87CEFA | 135, 206, 250 | 203, 92%, 75% | 12.2:1 black text | |
| lightslategray | #778899 | 119, 136, 153 | 210, 14%, 53% | 5.8:1 black text | |
| lightsteelblue | #B0C4DE | 176, 196, 222 | 214, 41%, 78% | 11.8:1 black text | |
| lightyellow | #FFFFE0 | 255, 255, 224 | 60, 100%, 94% | 20.6:1 black text | |
| lime | #00FF00 | 0, 255, 0 | 120, 100%, 50% | 15.3:1 black text | |
| limegreen | #32CD32 | 50, 205, 50 | 120, 61%, 50% | 9.9:1 black text | |
| linen | #FAF0E6 | 250, 240, 230 | 30, 67%, 94% | 18.7:1 black text | |
| magenta | #FF00FF | 255, 0, 255 | 300, 100%, 50% | 6.7:1 black text | |
| maroon | #800000 | 128, 0, 0 | 0, 100%, 25% | 10.9:1 white text | |
| mediumaquamarine | #66CDAA | 102, 205, 170 | 160, 51%, 60% | 10.9:1 black text | |
| mediumblue | #0000CD | 0, 0, 205 | 240, 100%, 40% | 11.2:1 white text | |
| mediumorchid | #BA55D3 | 186, 85, 211 | 288, 59%, 58% | 5.3:1 black text | |
| mediumpurple | #9370DB | 147, 112, 219 | 260, 60%, 65% | 5.6:1 black text | |
| mediumseagreen | #3CB371 | 60, 179, 113 | 147, 50%, 47% | 7.9:1 black text | |
| mediumslateblue | #7B68EE | 123, 104, 238 | 249, 80%, 67% | 5.1:1 black text | |
| mediumspringgreen | #00FA9A | 0, 250, 154 | 157, 100%, 49% | 15.1:1 black text | |
| mediumturquoise | #48D1CC | 72, 209, 204 | 178, 60%, 55% | 11.3:1 black text | |
| mediumvioletred | #C71585 | 199, 21, 133 | 322, 81%, 43% | 5.4:1 white text | |
| midnightblue | #191970 | 25, 25, 112 | 240, 64%, 27% | 14.8:1 white text | |
| mintcream | #F5FFFA | 245, 255, 250 | 150, 100%, 98% | 20.6:1 black text | |
| mistyrose | #FFE4E1 | 255, 228, 225 | 6, 100%, 94% | 17.4:1 black text | |
| moccasin | #FFE4B5 | 255, 228, 181 | 38, 100%, 85% | 17.0:1 black text | |
| navajowhite | #FFDEAD | 255, 222, 173 | 36, 100%, 84% | 16.3:1 black text | |
| navy | #000080 | 0, 0, 128 | 240, 100%, 25% | 16.0:1 white text | |
| oldlace | #FDF5E6 | 253, 245, 230 | 39, 85%, 95% | 19.4:1 black text | |
| olive | #808000 | 128, 128, 0 | 60, 100%, 25% | 5.0:1 black text | |
| olivedrab | #6B8E23 | 107, 142, 35 | 80, 60%, 35% | 5.5:1 black text | |
| orange | #FFA500 | 255, 165, 0 | 39, 100%, 50% | 10.6:1 black text | |
| orangered | #FF4500 | 255, 69, 0 | 16, 100%, 50% | 6.1:1 black text | |
| orchid | #DA70D6 | 218, 112, 214 | 302, 59%, 65% | 7.3:1 black text | |
| palegoldenrod | #EEE8AA | 238, 232, 170 | 55, 67%, 80% | 16.8:1 black text | |
| palegreen | #98FB98 | 152, 251, 152 | 120, 93%, 79% | 16.6:1 black text | |
| paleturquoise | #AFEEEE | 175, 238, 238 | 180, 65%, 81% | 16.3:1 black text | |
| palevioletred | #DB7093 | 219, 112, 147 | 340, 60%, 65% | 6.8:1 black text | |
| papayawhip | #FFEFD5 | 255, 239, 213 | 37, 100%, 92% | 18.6:1 black text | |
| peachpuff | #FFDAB9 | 255, 218, 185 | 28, 100%, 86% | 16.0:1 black text | |
| peru | #CD853F | 205, 133, 63 | 30, 59%, 53% | 7.0:1 black text | |
| pink | #FFC0CB | 255, 192, 203 | 350, 100%, 88% | 13.7:1 black text | |
| plum | #DDA0DD | 221, 160, 221 | 300, 47%, 75% | 10.1:1 black text | |
| powderblue | #B0E0E6 | 176, 224, 230 | 187, 52%, 80% | 14.7:1 black text | |
| purple | #800080 | 128, 0, 128 | 300, 100%, 25% | 9.4:1 white text | |
| rebeccapurple | #663399 | 102, 51, 153 | 270, 50%, 40% | 8.4:1 white text | |
| red | #FF0000 | 255, 0, 0 | 0, 100%, 50% | 5.3:1 black text | |
| rosybrown | #BC8F8F | 188, 143, 143 | 0, 25%, 65% | 7.5:1 black text | |
| royalblue | #4169E1 | 65, 105, 225 | 225, 73%, 57% | 4.8:1 white text | |
| saddlebrown | #8B4513 | 139, 69, 19 | 25, 76%, 31% | 7.1:1 white text | |
| salmon | #FA8072 | 250, 128, 114 | 6, 93%, 71% | 8.4:1 black text | |
| sandybrown | #F4A460 | 244, 164, 96 | 28, 87%, 67% | 10.3:1 black text | |
| seagreen | #2E8B57 | 46, 139, 87 | 146, 50%, 36% | 4.9:1 black text | |
| seashell | #FFF5EE | 255, 245, 238 | 25, 100%, 97% | 19.5:1 black text | |
| sienna | #A0522D | 160, 82, 45 | 19, 56%, 40% | 5.6:1 white text | |
| silver | #C0C0C0 | 192, 192, 192 | 0, 0%, 75% | 11.5:1 black text | |
| skyblue | #87CEEB | 135, 206, 235 | 197, 71%, 73% | 12.1:1 black text | |
| slateblue | #6A5ACD | 106, 90, 205 | 248, 53%, 58% | 5.3:1 white text | |
| slategray | #708090 | 112, 128, 144 | 210, 13%, 50% | 5.2:1 black text | |
| snow | #FFFAFA | 255, 250, 250 | 0, 100%, 99% | 20.3:1 black text | |
| springgreen | #00FF7F | 0, 255, 127 | 150, 100%, 50% | 15.6:1 black text | |
| steelblue | #4682B4 | 70, 130, 180 | 207, 44%, 49% | 5.1:1 black text | |
| tan | #D2B48C | 210, 180, 140 | 34, 44%, 69% | 10.6:1 black text | |
| teal | #008080 | 0, 128, 128 | 180, 100%, 25% | 4.8:1 white text | |
| thistle | #D8BFD8 | 216, 191, 216 | 300, 24%, 80% | 12.4:1 black text | |
| tomato | #FF6347 | 255, 99, 71 | 9, 100%, 64% | 7.1:1 black text | |
| turquoise | #40E0D0 | 64, 224, 208 | 174, 72%, 56% | 12.8:1 black text | |
| violet | #EE82EE | 238, 130, 238 | 300, 76%, 72% | 9.1:1 black text | |
| wheat | #F5DEB3 | 245, 222, 179 | 39, 77%, 83% | 16.0:1 black text | |
| white | #FFFFFF | 255, 255, 255 | 0, 0%, 100% | 21.0:1 black text | |
| whitesmoke | #F5F5F5 | 245, 245, 245 | 0, 0%, 96% | 19.3:1 black text | |
| yellow | #FFFF00 | 255, 255, 0 | 60, 100%, 50% | 19.6:1 black text | |
| yellowgreen | #9ACD32 | 154, 205, 50 | 80, 61%, 50% | 11.2:1 black text |
Where the names came from
The list is a historical accident rather than a designed palette. Sixteen colours came from the Windows VGA palette into HTML 3.2: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white and yellow. Those sixteen are the only ones in the HTML 4.01 specification.
The remaining 130 arrived from the X11 window system colour database, where they had been contributed over years with no coordination. That explains the inconsistencies:
gray(#808080) is darker thandarkgray(#A9A9A9). X11 and VGA disagreed and both names survived.green(#008000) is much darker thanlime(#00FF00), which is the actual pure green.- Both
grayandgreyspellings work for every grey keyword. aquaandcyanare identical, as arefuchsiaandmagenta.
rebeccapurple (#663399) is the only addition since. It was added to CSS Color Level 4 in 2014 in memory of Rebecca Meyer, the six-year-old daughter of CSS pioneer Eric Meyer; purple was her favourite colour and the hex value nods to the shorthand #639.
Modern colour syntax
Named colours are convenient for prototypes and debugging. Production design systems use notations that support alpha and perceptual manipulation.
/* Legacy */
color: #FF6347;
color: rgb(255, 99, 71);
color: rgba(255, 99, 71, 0.8);
/* Modern space-separated syntax */
color: rgb(255 99 71 / 80%);
color: hsl(9 100% 64% / 80%);
/* Perceptually uniform — the current best practice */
color: oklch(0.7 0.19 34);
/* Relative colours: derive from an existing value */
--hover: oklch(from var(--brand) calc(l - 0.1) c h);oklch() matters because HSL is not perceptually uniform: hsl(60 100% 50%) (yellow) looks far brighter than hsl(240 100% 50%) (blue) despite identical stated lightness. In OKLCH the lightness value corresponds to what the eye actually perceives, so a palette built by varying L has genuinely even steps. It is supported in every major browser since 2023.
Convert between all these formats with the colour converter.
Using colour accessibly
WCAG 2.2 requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt, or 14pt bold) at level AA. Level AAA raises these to 7:1 and 4.5:1.
Most named colours fail against white. yellow on white is 1.07:1 — effectively invisible. gold, lime, cyan and aqua are similarly unusable for text.
Never use colour alone to convey meaning. About 8% of men and 0.5% of women have some form of colour vision deficiency. A red “error” and green “success” that differ only in hue are indistinguishable to them. Add an icon, a label or a pattern.
Check any pair with the contrast checker, and read the colour accessibility guide for the full requirements.
Frequently Asked Questions
How many CSS named colours are there?
148, including transparent and currentColor as special keywords. 147 are actual colour values, and rebeccapurple was the most recent addition in 2014.
Why is darkgray lighter than gray?
They came from different sources. gray (#808080) came from the VGA palette and darkgray (#A9A9A9) from X11. Both names were standardised and the inconsistency was preserved for compatibility.
What is the difference between green and lime?
green is #008000, a dark green from the VGA palette. lime is #00FF00, pure maximum green. The naming is historical, not descriptive.Can I use grey instead of gray?
Yes. Every grey-related keyword accepts both spellings, including darkgrey, lightgrey and slategrey.
Are named colours slower than hex?
No. The browser resolves them at parse time to the same internal value. Choose whichever is more readable; design systems usually prefer custom properties over either.
What is rebeccapurple?
#663399, added to CSS in 2014 in memory of Rebecca Meyer, daughter of Eric Meyer. It is the only colour keyword added since the X11 set.
Should I use oklch instead of hex?
For design systems, yes. OKLCH is perceptually uniform, so equal changes in lightness look equal, which makes generating consistent tints and shades far easier.
Sources & further reading
- CSS Color Level 4: Named colors — the normative list of all 148 keywords
- MDN: named-color — practical reference with rendered swatches
- WCAG 2.2: Contrast (Minimum) — the 4.5:1 and 3:1 requirements
- Björn Ottosson: OKLab — the perceptual colour space behind oklch()