dark slate gray color code
The hex code for dark slate gray is #2F4F4F, which is rgb(47, 79, 79) in RGB and cmyk(41%, 0%, 0%, 69%) in CMYK. It's a dark, muted cyan. It is a built-in CSS colour, so you can also write it as “darkslategray”.
Build a full palette from it: open in the palette generator.
Move the sliders to find a lighter, darker or softer dark slate gray; the codes update as you go.
Dark Slate Gray colour codes
| HEX | #2F4F4F |
|---|---|
| RGB | rgb(47, 79, 79) |
| HSL | hsl(180, 25%, 25%) |
| HSV / HSB | hsv(180, 41%, 31%) |
| CMYK | cmyk(41%, 0%, 0%, 69%) |
| Decimal | 3100495 |
| CSS keyword | darkslategray, darkslategrey |
About dark slate gray
Dark Slate Gray sits at a hue of 180° on the colour wheel, with 25% saturation and 25% lightness. That makes it a cool colour: cool colours feel calm and steady and appear to recede, so they work well for large areas.
For text, white reads better on dark slate gray. Dark Slate Gray as text on a white background has a contrast ratio of 8.92:1, which passes the WCAG AA rule for body text (4.5:1). On black it is 2.35:1, which fails AA for body text.
Tints and shades of dark slate gray
Tints mix dark slate gray with white and shades mix it with black, in 10% steps. They're the easiest way to get lighter backgrounds and darker hover or text colours that still match.
Colours that go with dark slate gray
Complementary — opposite on the colour wheel: maximum contrast
Analogous — neighbours 30° either side: calm and natural
Triadic — three hues 120° apart: lively but balanced
Split complementary — the two neighbours of the complement: contrast with less tension
Tetradic — four hues 90° apart: rich, use one as the main colour
Dark Slate Gray text contrast
| Combination | Ratio | AA normal (4.5:1) | AA large (3:1) | AAA (7:1) |
|---|---|---|---|---|
| dark slate gray on white | 8.92:1 | pass | pass | pass |
| dark slate gray on black | 2.35:1 | fail | fail | fail |
Check dark slate gray against any other colour in the contrast checker.
How dark slate gray looks with colour blindness
Simulated with the Machado et al. (2009) model for the complete loss of one type of cone cell. Colour vision deficiency affects roughly 1 in 12 men and 1 in 200 women, most often as red-green colour blindness.
Use dark slate gray in code
.dark-slate-gray {
color: darkslategray;
background-color: #2f4f4f;
border-color: rgb(47, 79, 79);
}Frequently asked questions
What is the hex code for dark slate gray?
Dark Slate Gray is #2F4F4F (lowercase #2f4f4f). It's the official value of the CSS keyword “darkslategray”, which can also be written “darkslategrey”.
What is dark slate gray in RGB, HSL and CMYK?
RGB: rgb(47, 79, 79). HSL: hsl(180, 25%, 25%). CMYK: cmyk(41%, 0%, 0%, 69%). CMYK is a simple conversion for reference; for professional printing, ask your printer for a matching ink or Pantone swatch.
What colours go with dark slate gray?
Its complementary colour is #4F2F2F (close to wine), which gives the strongest contrast. For a calmer look, use the analogous colours #2F4F3F and #2F3F4F, or the triadic pair #4F2F4F and #4F4F2F. Tints and shades of dark slate gray itself always work together.
Is dark slate gray a warm or cool colour?
Dark Slate Gray has a hue of 180°, which makes it cool.
Should I use black or white text on dark slate gray?
White. Black text on dark slate gray has a contrast ratio of 2.35:1 and white text has 8.92:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.
How do I use dark slate gray in CSS?
Write color: darkslategray; or color: #2f4f4f; — both give the same colour. Named colours work in every browser.