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.

Updated: 2 August 2026Read: 8 minRuns: 100% in your browser

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.

NameHEXRGBHSLBest text contrast
aliceblue#F0F8FF240, 248, 255208, 100%, 97%19.6:1 black text
antiquewhite#FAEBD7250, 235, 21534, 78%, 91%17.9:1 black text
aqua#00FFFF0, 255, 255180, 100%, 50%16.7:1 black text
aquamarine#7FFFD4127, 255, 212160, 100%, 75%17.2:1 black text
azure#F0FFFF240, 255, 255180, 100%, 97%20.5:1 black text
beige#F5F5DC245, 245, 22060, 56%, 91%19.0:1 black text
bisque#FFE4C4255, 228, 19633, 100%, 88%17.1:1 black text
black#0000000, 0, 00, 0%, 0%21.0:1 white text
blanchedalmond#FFEBCD255, 235, 20536, 100%, 90%18.0:1 black text
blue#0000FF0, 0, 255240, 100%, 50%8.6:1 white text
blueviolet#8A2BE2138, 43, 226271, 76%, 53%6.0:1 white text
brown#A52A2A165, 42, 420, 59%, 41%7.1:1 white text
burlywood#DEB887222, 184, 13534, 57%, 70%11.3:1 black text
cadetblue#5F9EA095, 158, 160182, 25%, 50%6.9:1 black text
chartreuse#7FFF00127, 255, 090, 100%, 50%16.2:1 black text
chocolate#D2691E210, 105, 3025, 75%, 47%5.8:1 black text
coral#FF7F50255, 127, 8016, 100%, 66%8.4:1 black text
cornflowerblue#6495ED100, 149, 237219, 79%, 66%7.1:1 black text
cornsilk#FFF8DC255, 248, 22048, 100%, 93%19.7:1 black text
crimson#DC143C220, 20, 60348, 83%, 47%5.0:1 white text
cyan#00FFFF0, 255, 255180, 100%, 50%16.7:1 black text
darkblue#00008B0, 0, 139240, 100%, 27%15.3:1 white text
darkcyan#008B8B0, 139, 139180, 100%, 27%5.1:1 black text
darkgoldenrod#B8860B184, 134, 1143, 89%, 38%6.5:1 black text
darkgray#A9A9A9169, 169, 1690, 0%, 66%8.9:1 black text
darkgreen#0064000, 100, 0120, 100%, 20%7.4:1 white text
darkkhaki#BDB76B189, 183, 10756, 38%, 58%10.1:1 black text
darkmagenta#8B008B139, 0, 139300, 100%, 27%8.5:1 white text
darkolivegreen#556B2F85, 107, 4782, 39%, 30%5.9:1 white text
darkorange#FF8C00255, 140, 033, 100%, 50%9.0:1 black text
darkorchid#9932CC153, 50, 204280, 61%, 50%5.7:1 white text
darkred#8B0000139, 0, 00, 100%, 27%10.0:1 white text
darksalmon#E9967A233, 150, 12215, 72%, 70%9.1:1 black text
darkseagreen#8FBC8F143, 188, 143120, 25%, 65%9.8:1 black text
darkslateblue#483D8B72, 61, 139248, 39%, 39%9.1:1 white text
darkslategray#2F4F4F47, 79, 79180, 25%, 25%8.9:1 white text
darkturquoise#00CED10, 206, 209181, 100%, 41%10.7:1 black text
darkviolet#9400D3148, 0, 211282, 100%, 41%6.6:1 white text
deeppink#FF1493255, 20, 147328, 100%, 54%5.8:1 black text
deepskyblue#00BFFF0, 191, 255195, 100%, 50%9.9:1 black text
dimgray#696969105, 105, 1050, 0%, 41%5.5:1 white text
dodgerblue#1E90FF30, 144, 255210, 100%, 56%6.5:1 black text
firebrick#B22222178, 34, 340, 68%, 42%6.7:1 white text
floralwhite#FFFAF0255, 250, 24040, 100%, 97%20.2:1 black text
forestgreen#228B2234, 139, 34120, 61%, 34%4.8:1 black text
fuchsia#FF00FF255, 0, 255300, 100%, 50%6.7:1 black text
gainsboro#DCDCDC220, 220, 2200, 0%, 86%15.3:1 black text
ghostwhite#F8F8FF248, 248, 255240, 100%, 99%19.9:1 black text
gold#FFD700255, 215, 051, 100%, 50%15.0:1 black text
goldenrod#DAA520218, 165, 3243, 74%, 49%9.4:1 black text
gray#808080128, 128, 1280, 0%, 50%5.3:1 black text
green#0080000, 128, 0120, 100%, 25%5.1:1 white text
greenyellow#ADFF2F173, 255, 4784, 100%, 59%17.1:1 black text
honeydew#F0FFF0240, 255, 240120, 100%, 97%20.3:1 black text
hotpink#FF69B4255, 105, 180330, 100%, 71%7.9:1 black text
indianred#CD5C5C205, 92, 920, 53%, 58%5.3:1 black text
indigo#4B008275, 0, 130275, 100%, 25%13.0:1 white text
ivory#FFFFF0255, 255, 24060, 100%, 97%20.8:1 black text
khaki#F0E68C240, 230, 14054, 77%, 75%16.4:1 black text
lavender#E6E6FA230, 230, 250240, 67%, 94%17.1:1 black text
lavenderblush#FFF0F5255, 240, 245340, 100%, 97%19.0:1 black text
lawngreen#7CFC00124, 252, 090, 100%, 49%15.8:1 black text
lemonchiffon#FFFACD255, 250, 20554, 100%, 90%19.8:1 black text
lightblue#ADD8E6173, 216, 230195, 53%, 79%13.7:1 black text
lightcoral#F08080240, 128, 1280, 79%, 72%8.1:1 black text
lightcyan#E0FFFF224, 255, 255180, 100%, 94%19.9:1 black text
lightgoldenrodyellow#FAFAD2250, 250, 21060, 80%, 90%19.7:1 black text
lightgray#D3D3D3211, 211, 2110, 0%, 83%14.0:1 black text
lightgreen#90EE90144, 238, 144120, 73%, 75%14.8:1 black text
lightpink#FFB6C1255, 182, 193351, 100%, 86%12.7:1 black text
lightsalmon#FFA07A255, 160, 12217, 100%, 74%10.6:1 black text
lightseagreen#20B2AA32, 178, 170177, 70%, 41%8.0:1 black text
lightskyblue#87CEFA135, 206, 250203, 92%, 75%12.2:1 black text
lightslategray#778899119, 136, 153210, 14%, 53%5.8:1 black text
lightsteelblue#B0C4DE176, 196, 222214, 41%, 78%11.8:1 black text
lightyellow#FFFFE0255, 255, 22460, 100%, 94%20.6:1 black text
lime#00FF000, 255, 0120, 100%, 50%15.3:1 black text
limegreen#32CD3250, 205, 50120, 61%, 50%9.9:1 black text
linen#FAF0E6250, 240, 23030, 67%, 94%18.7:1 black text
magenta#FF00FF255, 0, 255300, 100%, 50%6.7:1 black text
maroon#800000128, 0, 00, 100%, 25%10.9:1 white text
mediumaquamarine#66CDAA102, 205, 170160, 51%, 60%10.9:1 black text
mediumblue#0000CD0, 0, 205240, 100%, 40%11.2:1 white text
mediumorchid#BA55D3186, 85, 211288, 59%, 58%5.3:1 black text
mediumpurple#9370DB147, 112, 219260, 60%, 65%5.6:1 black text
mediumseagreen#3CB37160, 179, 113147, 50%, 47%7.9:1 black text
mediumslateblue#7B68EE123, 104, 238249, 80%, 67%5.1:1 black text
mediumspringgreen#00FA9A0, 250, 154157, 100%, 49%15.1:1 black text
mediumturquoise#48D1CC72, 209, 204178, 60%, 55%11.3:1 black text
mediumvioletred#C71585199, 21, 133322, 81%, 43%5.4:1 white text
midnightblue#19197025, 25, 112240, 64%, 27%14.8:1 white text
mintcream#F5FFFA245, 255, 250150, 100%, 98%20.6:1 black text
mistyrose#FFE4E1255, 228, 2256, 100%, 94%17.4:1 black text
moccasin#FFE4B5255, 228, 18138, 100%, 85%17.0:1 black text
navajowhite#FFDEAD255, 222, 17336, 100%, 84%16.3:1 black text
navy#0000800, 0, 128240, 100%, 25%16.0:1 white text
oldlace#FDF5E6253, 245, 23039, 85%, 95%19.4:1 black text
olive#808000128, 128, 060, 100%, 25%5.0:1 black text
olivedrab#6B8E23107, 142, 3580, 60%, 35%5.5:1 black text
orange#FFA500255, 165, 039, 100%, 50%10.6:1 black text
orangered#FF4500255, 69, 016, 100%, 50%6.1:1 black text
orchid#DA70D6218, 112, 214302, 59%, 65%7.3:1 black text
palegoldenrod#EEE8AA238, 232, 17055, 67%, 80%16.8:1 black text
palegreen#98FB98152, 251, 152120, 93%, 79%16.6:1 black text
paleturquoise#AFEEEE175, 238, 238180, 65%, 81%16.3:1 black text
palevioletred#DB7093219, 112, 147340, 60%, 65%6.8:1 black text
papayawhip#FFEFD5255, 239, 21337, 100%, 92%18.6:1 black text
peachpuff#FFDAB9255, 218, 18528, 100%, 86%16.0:1 black text
peru#CD853F205, 133, 6330, 59%, 53%7.0:1 black text
pink#FFC0CB255, 192, 203350, 100%, 88%13.7:1 black text
plum#DDA0DD221, 160, 221300, 47%, 75%10.1:1 black text
powderblue#B0E0E6176, 224, 230187, 52%, 80%14.7:1 black text
purple#800080128, 0, 128300, 100%, 25%9.4:1 white text
rebeccapurple#663399102, 51, 153270, 50%, 40%8.4:1 white text
red#FF0000255, 0, 00, 100%, 50%5.3:1 black text
rosybrown#BC8F8F188, 143, 1430, 25%, 65%7.5:1 black text
royalblue#4169E165, 105, 225225, 73%, 57%4.8:1 white text
saddlebrown#8B4513139, 69, 1925, 76%, 31%7.1:1 white text
salmon#FA8072250, 128, 1146, 93%, 71%8.4:1 black text
sandybrown#F4A460244, 164, 9628, 87%, 67%10.3:1 black text
seagreen#2E8B5746, 139, 87146, 50%, 36%4.9:1 black text
seashell#FFF5EE255, 245, 23825, 100%, 97%19.5:1 black text
sienna#A0522D160, 82, 4519, 56%, 40%5.6:1 white text
silver#C0C0C0192, 192, 1920, 0%, 75%11.5:1 black text
skyblue#87CEEB135, 206, 235197, 71%, 73%12.1:1 black text
slateblue#6A5ACD106, 90, 205248, 53%, 58%5.3:1 white text
slategray#708090112, 128, 144210, 13%, 50%5.2:1 black text
snow#FFFAFA255, 250, 2500, 100%, 99%20.3:1 black text
springgreen#00FF7F0, 255, 127150, 100%, 50%15.6:1 black text
steelblue#4682B470, 130, 180207, 44%, 49%5.1:1 black text
tan#D2B48C210, 180, 14034, 44%, 69%10.6:1 black text
teal#0080800, 128, 128180, 100%, 25%4.8:1 white text
thistle#D8BFD8216, 191, 216300, 24%, 80%12.4:1 black text
tomato#FF6347255, 99, 719, 100%, 64%7.1:1 black text
turquoise#40E0D064, 224, 208174, 72%, 56%12.8:1 black text
violet#EE82EE238, 130, 238300, 76%, 72%9.1:1 black text
wheat#F5DEB3245, 222, 17939, 77%, 83%16.0:1 black text
white#FFFFFF255, 255, 2550, 0%, 100%21.0:1 black text
whitesmoke#F5F5F5245, 245, 2450, 0%, 96%19.3:1 black text
yellow#FFFF00255, 255, 060, 100%, 50%19.6:1 black text
yellowgreen#9ACD32154, 205, 5080, 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 than darkgray (#A9A9A9). X11 and VGA disagreed and both names survived.
  • green (#008000) is much darker than lime (#00FF00), which is the actual pure green.
  • Both gray and grey spellings work for every grey keyword.
  • aqua and cyan are identical, as are fuchsia and magenta.

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

  1. CSS Color Level 4: Named colors — the normative list of all 148 keywords
  2. MDN: named-color — practical reference with rendered swatches
  3. WCAG 2.2: Contrast (Minimum) — the 4.5:1 and 3:1 requirements
  4. Björn Ottosson: OKLab — the perceptual colour space behind oklch()