Dark gray
Dark gray is a medium gray with no tint at all. Hex code #A9A9A9.
Color codes
- CSS name
darkgray, darkgrey - HEX
#A9A9A9 - RGB
rgb(169 169 169) - HSL
hsl(0 0% 66%) - HSB / HSV
hsb(0, 0%, 66%) - OKLCH
oklch(73.5% 0 0) - CMYK
cmyk(0%, 0%, 0%, 34%)
White text
2.35:1 · fails WCAG
Black text
8.93:1 · passes WCAG AAA
Shades
Tones
About this color
Dark gray in CSS and design
Dark gray is a medium gray with no tint at all. Dark gray is one of the extended color keywords, which CSS adopted from the X11 color names used on Unix workstations.
Despite its name, dark gray (#A9A9A9) is lighter than gray (#808080). The extended colors came from the X11 list, where gray was a lighter shade than the gray HTML already had, so the "dark" X11 variant ended up lighter than the basic one.
Use it in CSS by name or by any of its codes; these all give the same color:
color: darkgray;
color: #A9A9A9;
color: rgb(169 169 169);
color: hsl(0 0% 66%);For text on dark gray, black reads best. Check other combinations with the contrast checker, or browse all CSS color names.
More tools
Work with this color
- Color picker and converterPick a color and get HEX, RGB, HSL, HSB, CMYK and OKLCH, plus shades and harmonies.
- Contrast checkerCheck text and background colors against WCAG AA and AAA, and fix failing ones.
- CSS color namesAll 148 named colors with hex codes, shades, contrast and matching palettes.
- Palette generatorBuild a color palette from harmony rules, with shades and CSS variables.
Frequently asked questions
What is the hex code for dark gray?
#A9A9A9. In CSS you can also use the keyword darkgray or darkgrey, which works in every browser.
What is dark gray in RGB and HSL?
In RGB it is rgb(169 169 169), in HSL hsl(0 0% 66%). For print, cmyk(0%, 0%, 0%, 34%) is a starting point, but CMYK depends on paper and ink, so check with your printer.
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.
Which colors go with dark gray?
As a neutral, dark gray goes with almost any color. It works well as a background, border or text color next to a vivid accent, and with the lighter and darker tones from its shades.