Skip to content

Dark gray (Grey)

Dark gray is a true neutral, with equal parts red, green and blue. Hex code #A9A9A9.

Dark gray#A9A9A9

Dark gray color codes

  • CSS namedarkgray, darkgrey
  • HEX#A9A9A9
  • RGBrgb(169, 169, 169)
  • HSLhsl(0, 0%, 66%)
  • OKLCHoklch(73.5% 0 0)
HSB and CMYK values
  • HSB / HSVhsb(0, 0%, 66%)
  • CMYKC0 M0 Y0 K34

White text

2.35:1 · fails WCAG

Black text

8.93:1 · passes WCAG AAA

Shades of dark gray

A darker shade of dark gray is #828282 (400), and a lighter one is #D4D4D4 (100).

Colors that go with dark gray

Tones

Dark gray has no complementary color: grays, black and white have no hue to turn around the color wheel.

Click a color to copy its hex code.

Colors similar to dark gray

Each compared with dark gray.

About this color

Dark gray in CSS and design

Dark gray is one of the extended color keywords, which mostly go back to the X11 color names of Unix systems. These four lines all give the same dark gray:

color: darkgray;
color: #A9A9A9;
color: rgb(169, 169, 169);
color: hsl(0, 0%, 66%);

What to know about dark gray

Despite its name, dark gray (#A9A9A9) is lighter than gray (#808080). It comes from the X11 color list, where plain gray is #BEBEBE and dark gray really is the darker one; CSS kept the gray of its 16 basic colors instead. The CSS Color specification names this as one of the inconsistencies in the color names, along with light pink being darker than pink.

Dark gray and the other grays

Dark gray sits between light slate gray (#778899) and silver (#C0C0C0) in lightness. As text on dark gray, black reaches the 4.5:1 contrast that WCAG AA asks for.

GrayHexLightnessContrast with dark gray
Black#0000000%8.93:1
Dark slate gray#2F4F4F40%3.79:1
Dim gray#69696952%2.33:1
Slate gray#70809059%1.72:1
Gray#80808060%1.68:1
Light slate gray#77889962%1.54:1
Dark gray#A9A9A973%–
Silver#C0C0C081%1.29:1
Light gray#D3D3D387%1.56:1
Gainsboro#DCDCDC89%1.71:1
White smoke#F5F5F597%2.15:1
White#FFFFFF100%2.35:1

Lightness is OKLCH lightness, which follows how light a color looks.

Frequently asked questions

What is the hex code for dark gray (grey)?

#A9A9A9. Dark gray and dark grey are two spellings for the same color, and CSS accepts both keywords, darkgray and darkgrey, in every browser.

What is dark gray in RGB and HSL?

In RGB it is rgb(169, 169, 169) and in HSL hsl(0, 0%, 66%). In CMYK it is about C0 M0 Y0 K34, though printed colors vary with paper and ink.

Should I use black or white text on dark gray?

Black text works better: it has a contrast ratio of 8.93:1 and passes WCAG AAA. White text reaches 2.35:1.

What is the complementary color of dark gray?

Dark gray has no complementary color. A complement is found by turning a color's hue halfway around the color wheel, and grays, black and white have no hue to turn.

Which colors go with dark gray?

As a neutral, dark gray goes with almost any color. Its own tones, from #4D4D4D to #DEDEDE, make a calm palette, and a single vivid accent stands out against it.

Is dark gray darker than gray?

No. In CSS, dark gray (#A9A9A9) is lighter than gray (#808080), and dim gray (#696969) is darker than both. The names come from two different color lists that CSS merged, so only the hex codes tell you which gray is darker.

What hex code should I use for a gray that looks dark?

CSS dark gray, #A9A9A9, is a light-to-medium gray: as text on white it reaches only 2.35:1. For a gray that looks dark, use dim gray (#696969, 5.48:1) or a gray without a CSS name, such as #555555 (7.45:1), #404040 (10.36:1) or #333333 (12.63:1). Dark slate gray (#2F4F4F) is a dark gray with a cool green-blue tint.