Photo in the color Dark slate gray
Pictured: Dark slate gray
rgb(47, 79, 79)
#2F4F4F

Dark Slate Gray #2F4F4F RGB Color Code

CSS keyword darkslategray.

Dark Slate Gray (#2F4F4F) is a dark tinted gray. In RGB it is made of 18% red, 31% green and 31% blue (R 47, G 79, B 79). The green channel is the strongest. In HSL it has a hue of 180°, 25% saturation and 25% lightness. Its relative luminance is 0.068, so white text is easier to read on top of it. For print, a rough CMYK match is 41% cyan, 0% magenta, 0% yellow and 69% black. Check it against your printer's ICC profile before you print. It is a cool color. It goes well with warm oranges and reds for contrast. For a calm, matching look, use nearby cool tones.

Open in color picker

Dark Slate Gray color codes

#2F4F4F in every common color format. Click a value to copy it.

FormatValueNotesCopy
HEX #2F4F4F Valid CSS
CSS name darkslategray Valid CSS
RGB rgb(47, 79, 79) Valid CSS
HSL hsl(180, 25%, 25%) Valid CSS
HSV / HSB hsv(180, 41%, 31%) Not a CSS format
HWB hwb(180 18% 69%) Valid CSS
CMYK cmyk(41%, 0%, 0%, 69%) Approximate (no ICC profile)
OKLCH oklch(40.3% 0.0377 195.76) Valid CSS
OKLab oklab(40.3% -0.0363 -0.0102) Valid CSS
CIELAB lab(31.14% -12.26 -3.94) D50, as in CSS
CIELCH lch(31.14% 12.88 197.8) Valid CSS
Display P3 color(display-p3 0.2129 0.3066 0.3081) Valid CSS
XYZ (D65) color(xyz-d65 0.0538 0.0676 0.0842) Valid CSS
Decimal 3100495 Integer (0xRRGGBB)

CMYK here is a rough screen match without an ICC profile. See CMYK and print. Relative luminance: 0.0676. Nearest web-safe color: #336666.

Mix Dark Slate Gray with other colors

See what #2F4F4F makes with red paint, under a green light, printed with cyan ink and in a digital blend with blue. Click a picture to change the colors and amounts in the color mixer.

Use Dark Slate Gray in your code

Ready to paste into CSS, Sass, Tailwind, iOS, Android and Flutter. Click the icon to copy a line.

WhereCodeCopy
CSS variable--dark-slate-gray: #2F4F4F;
Sass variable$dark-slate-gray: #2F4F4F;
Tailwind CSS v4@theme { --color-dark-slate-gray: #2F4F4F; }
Tailwind CSS v3 configcolors: { 'dark-slate-gray': '#2F4F4F' }
SwiftUIColor(red: 0.184, green: 0.31, blue: 0.31)
UIKitUIColor(red: 0.184, green: 0.31, blue: 0.31, alpha: 1)
Android XML<color name="dark_slate_gray">#FF2F4F4F</color>
Flutter and Jetpack ComposeColor(0xFF2F4F4F)

Accessibility and contrast

White text works best on #2F4F4F (8.93:1, AAA). Here is how #2F4F4F does as a text color:

Large heading text
Body text at 16px. The quick brown fox jumps over the lazy dog.
8.93:1 on white
APCA Lc 90
AAA
Large heading text
Body text at 16px. The quick brown fox jumps over the lazy dog.
2.35:1 on black
APCA Lc -12
Fails AATry #597A7A

Check this color against any background in the contrast checker. WCAG ratios and APCA Lc values measure different things, so one can't stand in for the other. Learn more.

How people with color blindness see Dark Slate Gray

#2F4F4F next to its complement and its two triadic colors, as seen with each type of color blindness.

  • Normal visionhow most people see it
  • Protanopiano red cones, about 1% of men
  • Deuteranopiano green cones, the most common type
  • Tritanopiano blue cones, very rare
  • Achromatopsiano color at all, very rare

With deuteranopia, #2F4F4F and #4F2F2F look much alike. With deuteranopia, #2F4F4F and #4F2F4F look much alike. Don't use these colors alone to tell things apart, for example in a chart. Add labels, patterns or a difference in lightness. Try your own colors in the color blindness simulator.

About the color Dark Slate Gray

A keyword you can type

Dark slate gray is one of the named colors in CSS, so darkslategray in a style sheet gives you #2F4F4F. CSS also accepts the British spelling darkslategrey. The name comes from the X11 color list of the X Window System, the source of most CSS color names. Both spellings appear in the CSS Color Module named color table, and you can browse the rest in our CSS color names list.

Gray in name only

The code mixes 47 red with 79 green and 79 blue. With red that low, the color leans toward a dark teal, and the ISCC-NBS system calls it a dark bluish green. Plain slate gray, #708090, is lighter and leans blue instead.

The X11 list has four more colors called DarkSlateGray1 to DarkSlateGray4. Oddly, they are light to medium cyans, from #97FFFF down to #528B8B, and they look nothing like the base color. White text on #2F4F4F has a contrast ratio of 8.93 to 1.

Dark Slate Gray in a user interface

A sample app screen with #2F4F4F as the main color, on a light and a dark theme.

Light theme

Dark theme

Buttons and bars use #2F4F4F as it is. On the dark theme, #2F4F4F is too hard to read as text (1.99:1), so links, the badge and outline text use #658686 there (4.49:1). Build a full color scheme around it in the UI color preview.

Color harmonies for Dark Slate Gray

These schemes turn the hue of #2F4F4F around the color wheel. Each swatch links to its own page.

Complementary

Two colors on opposite sides of the wheel. This gives the most contrast.

Open palette

Analogous

Hues that sit next to each other and look good together.

Open palette

Triadic

Three hues spaced evenly around the wheel. Bold, but still balanced.

Open palette

Split complementary

A base color plus the two hues on each side of its opposite. Strong contrast that clashes less.

Open palette

Tetradic (rectangle)

Two pairs of opposite colors. Let one color lead and use the others less.

Open palette

Square

Four hues 90° apart, spread evenly around the wheel.

Open palette

Monochromatic

One hue at different levels of lightness and saturation.

Open palette

Gradients with Dark Slate Gray

Four CSS gradients made from #2F4F4F. Copy the code, or open one in the gradient generator to change it.

Soft tint

From a pale tint to the full color.

background: linear-gradient(90deg, #D2D9D9, #2F4F4F);

Edit in the gradient generator

Deep shade

The color fading into a dark shade.

background: linear-gradient(180deg, #2F4F4F, #061010);

Edit in the gradient generator

Analogous

Its two neighbors on the color wheel.

background: linear-gradient(135deg, #2F4F3F, #2F4F4F, #2F3F4F);

Edit in the gradient generator

Triadic

A bold blend with a triadic color, through a clean middle.

background: linear-gradient(135deg, #2F4F4F, #43404F, #4F2F4F);

Edit in the gradient generator

Shades, tints and tones of Dark Slate Gray

Shades are darker, tints are lighter and tones are grayer. We make them in OKLCH so the steps look even. Hover a step to see its code, or click it to open it.

Design system scale (50 to 950)

Dark Slate Gray sits at step 800. Export the full scale as CSS variables or Tailwind tokens from the picker.

  1. 50
    EDFAFA
  2. 100
    E0F1F0
  3. 200
    CAE0E0
  4. 300
    ABC8C7
  5. 400
    8AAAAA
  6. 500
    6C8E8D
  7. 600
    527373
  8. 700
    3E5B5B
  9. 800
    2F4F4F
  10. 900
    223434
  11. 950
    151F1F

Closest RAL, Tailwind and CSS colors

The nearest match to #2F4F4F in three color systems that designers and builders use.

ΔE is the distance in OKLab: under 2 is hard to see, over 10 is a clearly different color. Browse all RAL colors, the Tailwind palette or the 148 CSS color names. RAL values on screens are only a guide, so check a real color chart before you order paint.

The named colors that look closest to this one (ΔE in OKLab). Browse all shades of gray or search the color library.