CSS color names · Grays

Dark Slate Gray color: hex #2f4f4f, RGB and HSL

Dark Slate Gray is the CSS keyword darkslategray (also darkslategrey), hex #2f4f4f, rgb(47, 79, 79), hsl(180, 25%, 25%). It is a very dark, soft cyan in the grays family. Below: the colors that go with it, its tints and shades, how it reads as text, and a complete interface palette built from it.

CSS name
darkslategray, darkslategrey
Hex
#2f4f4f
RGB
rgb(47, 79, 79)
HSL
hsl(180, 25%, 25%)
On white
8.93:1 — passes AA for body text
On black
2.35:1 — fails AA; use as a fill, not text
.example {
  color: darkslategray;          /* keyword */
  color: #2f4f4f;          /* hex */
  color: rgb(47, 79, 79); /* rgb */
  color: hsl(180, 25%, 25%); /* hsl */
}

What colors go with dark slate gray

Each match keeps dark slate gray's saturation and lightness and rotates only the hue, so the relationship is the wheel's and nothing else. Any of these can be an accent beside dark slate gray as the primary; the harmony guides explain which rule suits which interface.

Complementary

The opposite hue, 180° away — the strongest contrast, best kept to one accent per screen.

#4f2f2f

Split-complementary

The two neighbors of the complement, at 150° and 210° — most of the contrast with less tension, and two accents instead of one.

#4f2f3f
#4f3f2f

Triadic

Two hues at 120° and 240° — three evenly spaced signals, the scheme charts and category colors want.

#4f2f4f
#4f4f2f

Analogous

The neighbors at −30° and +30° — calm and cohesive, with emphasis coming from weight and size rather than hue.

#2f4f3f
#2f3f4f

Tints and shades of dark slate gray

Tints add lightness toward white; shades remove it toward black. The hue and saturation stay fixed, so every step still reads as dark slate gray — these are the hover, pressed, disabled and surface variants a single brand color needs.

Tints (lighter)

#477777
#5f9f9f
#87b7b7
#afcfcf
#d7e7e7

Shades (darker)

#274242
#1f3535
#182828
#101a1a
#080d0d

A UI color palette built from dark slate gray

The eight semantic roles an interface actually uses, derived from dark slate gray as the primary with the split-complementary rule: secondary and accent rotate around the wheel, and the five neutrals take the hue at lightness steps tuned for light and dark mode. This is the same derivation the palette generator runs — open it there to change the rule, drag the anchors, or export the set as CSS variables.

Light mode
primary
#2f4f4f
secondary
#4f2f3f
accent
#4f3f2f
background
#fcfdfd
surface
#f4f6f6
text
#161d1d
muted
#677e7e
border
#e3e8e8
Dark mode
primary
#6fa9a9
secondary
#a96f8c
accent
#a98c6f
background
#121717
surface
#1b2222
text
#f4f6f6
muted
#9fadad
border
#313f3f

Using dark slate gray in an interface

Grays are text, borders and disabled states. The slate grays are the useful ones: a whisper of blue keeps them from looking like dirt against a colored primary. A semantic palette tints its grays toward the brand hue for the same reason. Whichever role dark slate gray takes, define it once as a token rather than repeating the keyword: the semantic palette guide covers the eight roles, and the guides to complementary, triadic and the other color schemes explain how to weight the matches above.

What is the hex code for Dark Slate Gray?
Dark Slate Gray is #2f4f4f. In CSS the keyword darkslategray, the hex #2f4f4f, rgb(47, 79, 79) and hsl(180, 25%, 25%) all paint the same color. The keyword darkslategrey resolves to the same color.
What colors go with Dark Slate Gray?
Its complement is #4f2f2f, the split-complementary pair is #4f2f3f and #4f3f2f, the triadic partners are #4f2f4f and #4f4f2f, and the analogous neighbors are #2f4f3f and #2f3f4f. In an interface, use Dark Slate Gray for most colored elements and one of these for a single accent, at roughly an 80/20 split.
What is the opposite of Dark Slate Gray on the color wheel?
The opposite (complementary) color is #4f2f2f, the same saturation and lightness rotated 180° around the HSL wheel. Complementary pairs give the strongest contrast, which is why the complement should be used sparingly rather than at equal weight.
Can I use Dark Slate Gray for text?
Dark Slate Gray as text on white has a contrast ratio of 8.93:1, which passes WCAG AA for body text (4.5:1). On black it is 2.35:1, which fails for body text. It works as a text color on light surfaces.

Similar named colors

More grays

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.