darkslategray — #2F4F4F
#2F4F4F
rgb(47, 79, 79) · hsl(180, 25%, 25%) · CSS keyword darkslategray
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| darkslategray on white | 8.93:1 | AA | AA |
| darkslategray on black | 2.35:1 | — | — |
As a background, darkslategray takes white text: 8.93:1 against 2.35:1 the other way. A colour picker will give you the hex and stop there, which is why so many palettes look right and fail an accessibility audit.
Using it
color: darkslategray;
color: #2f4f4f;
color: rgb(47 79 79);
All three are the same colour. The keyword is one of the 141 CSS named colours — a list settled in CSS 2.1 and added to exactly once since, when rebeccapurple was standardised in 2014.
darkslategrey is the same colour: CSS accepts both spellings and they are byte for byte identical, so color: darkslategray and color: darkslategrey render the same.
Colours close to darkslategray
- darkslateblue — #483D8B
- darkolivegreen — #556B2F
- dimgray — #696969
- darkgreen — #006400
- rebeccapurple — #663399
- midnightblue — #191970
Frequently asked questions
What is the hex code for darkslategray?
The hex code for darkslategray is #2F4F4F — RGB 47, 79, 79.
Can I use darkslategray for text?
Yes. darkslategray reaches 8.93:1 against white, past the 4.5:1 that WCAG AA asks for body text.
Should text on darkslategray be black or white?
White — 8.93:1 against 2.35:1 the other way.
Other named colours
- darkturquoise — #00CED1
- darkviolet — #9400D3
- deeppink — #FF1493
- deepskyblue — #00BFFF
- dimgray — #696969
- dodgerblue — #1E90FF
- firebrick — #B22222
- floralwhite — #FFFAF0
- forestgreen — #228B22
- fuchsia — #FF00FF
- gainsboro — #DCDCDC
- ghostwhite — #F8F8FF
#2F4F4F in full — tints, shades and harmonies · All named colours · Colour reference