Free Accessible CSS Gradient Generator

← All Colors
#2F4F4F Dark Slate Gray

Dark Slate Gray Hex Code #2F4F4F

Dark Slate Gray is a dark, muted gray with the hex code #2F4F4F. In RGB it is 47, 79, 79, and in HSL it is 180°, 25%, 25%. It is one of the 148 named colors in CSS, so you can write “darkslategray” instead of the hex code. It is also written as “darkslategrey”.

HEX
#2F4F4F
RGB
rgb(47, 79, 79)
HSL
hsl(180, 25%, 25%)
HSV
hsv(180°, 41%, 31%)
CMYK
cmyk(41%, 0%, 0%, 69%)
CSS name
darkslategray

CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.

About Dark Slate Gray

On a white background Dark Slate Gray has a contrast ratio of 8.93:1 (AAA), and on black 2.35:1 (Fail). White text is the better choice on top of it.

It sits on the cool side of the color wheel, a range that tends to feel calm and appears to recede.

Grays do much of the quiet work in interface design: text, borders, backgrounds and disabled states. Because they carry no strong hue, they pair with almost any accent color.

Shades and tints of Dark Slate Gray

Tints mix Dark Slate Gray with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.

Color harmonies for Dark Slate Gray

These schemes are calculated from Dark Slate Gray on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.

Analogous

Open in the color wheel

Triadic

Open in the color wheel

Tetradic

Open in the color wheel

Square

Open in the color wheel

On the artist’s RYB wheel, the complement of Dark Slate Gray is #4F382F, close to the named color Dim Gray.

Dark Slate Gray contrast and accessibility

WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Dark Slate Gray scores against white and black.

Contrast of Dark Slate Gray with white and black
AgainstRatioAA normalAA largeAAA normalAAA large
White (#ffffff) 8.93:1 ✓ Pass ✓ Pass ✓ Pass ✓ Pass
Black (#000000) 2.35:1 ✕ Fail ✕ Fail ✕ Fail ✕ Fail
Aa White text on Dark Slate Gray8.93:1
Aa Black text on Dark Slate Gray2.35:1

Dark Slate Gray and color blindness

These are approximate previews of how Dark Slate Gray can look with the main types of color vision deficiency.

Protanopia #4B4C4F

Dark Slate Gray shifts slightly.

Deuteranopia #45484F

Dark Slate Gray shifts slightly.

Tritanopia #22514F

Dark Slate Gray looks almost the same.

Achromatopsia #4A4A4A

Dark Slate Gray shifts slightly.

Gradients with Dark Slate Gray

Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.

Dark Slate Gray to a lighter tint

background: linear-gradient(135deg, #2f4f4f 0%, #acb9b9 100%);

Dark Slate Gray to its analogous neighbour

background: linear-gradient(135deg, #2f4f4f 0%, #2f3f4f 100%);

Dark Slate Gray to its complement

background: linear-gradient(135deg, #2f4f4f 0%, #4f2f2f 100%);

Colors similar to Dark Slate Gray

How each close match differs from Dark Slate Gray.

More gray & black colors →

Use Dark Slate Gray in code

CSS
.element {
  color: #2f4f4f;
  background-color: #2f4f4f;
  border-color: darkslategray;   /* darkslategray is a valid CSS color name */
}
CSS variable
:root {
  --color-dark-slate-gray: #2f4f4f;
}
Tailwind
<!-- Tailwind arbitrary values -->
<div class="bg-[#2f4f4f] text-[#2f4f4f] border-[#2f4f4f]"></div>

/* Tailwind v4 theme color */
@theme {
  --color-dark-slate-gray: #2f4f4f;
}

Dark Slate Gray questions

What is the hex code for Dark Slate Gray?

The hex code for Dark Slate Gray is #2F4F4F. In RGB that is rgb(47, 79, 79), and in HSL it is hsl(180, 25%, 25%).

What is the complementary color of Dark Slate Gray?

On the RGB (screen) color wheel, the complement of Dark Slate Gray is #4F2F2F, which is close to Dim Gray. On the artist’s RYB wheel it is #4F382F, close to Dim Gray.

Should I use white or black text on Dark Slate Gray?

White text. It has a contrast ratio of 8.93:1 against Dark Slate Gray, which is WCAG AAA. The other option scores 2.35:1.

Is Dark Slate Gray accessible as a text color on white?

Yes. Dark Slate Gray on white scores 8.93:1, which passes WCAG AA for normal text (4.5:1) and AAA (7:1).

What are darker and lighter shades of Dark Slate Gray?

Mixing Dark Slate Gray with black gives #263F3F, #1C2F2F, #132020, #091010 (20% to 80% black). Mixing it with white gives #597272, #829595, #ACB9B9, #D5DCDC (20% to 80% white).

More color tools