CSS named color
Dark Slate Gray #2F4F4F
The CSS keyword darkslategray is #2F4F4F. It is a dark grayish teal in the cyan family. In OKLCH it sits at lightness 0.403, chroma 0.038 and hue 195.8°.
- Relative luminance
- 0.0676
- OKLCH L · C · h
- 0.403 · 0.038 · 195.8
- Best text
- White 8.92:1
- Hue family
- Cyan
#2F4F4F color codes
- HEX
#2F4F4F- RGB
rgb(47, 79, 79)- HSL
hsl(180, 25%, 25%)- OKLCH
oklch(0.403 0.038 195.8)- OKLab
oklab(0.403 -0.036 -0.010)- CIELAB (D65)
L* 31.26, a* -11.72, b* -3.72- XYZ (D65)
X 5.38, Y 6.76, Z 8.42- CMYK (naive)
cmyk(41%, 0%, 0%, 69%)
CIELAB and XYZ use the D65 white point; CSS lab() uses D50, so paste the OKLCH or HEX value into stylesheets. CMYK here is a plain formula with no press profile.
Legibility
Contrast: is #2F4F4F accessible?
White text on it reaches 8.92:1, passing AAA. Black text fails at 2.35:1.
WCAG 2 gives the same ratio whichever color is the text; APCA does not, so its Lc changes sign and size with polarity.
Open the Contrast System-
Black text on it
2.35:1
- AA fails
- AA large fails
- AAA fails
- APCA Lc +13
-
White text on it
8.92:1
- AA passes
- AA large passes
- AAA passes
- APCA Lc −94
-
As text on black
2.35:1
- AA fails
- AA large fails
- AAA fails
- APCA Lc −11
-
As text on white
8.92:1
- AA passes
- AA large passes
- AAA passes
- APCA Lc +90
Nearest versions that pass 4.5:1
-
For text on white
#2F4F4F 8.92:1
It already reaches 8.92:1 on white, so no change is needed.
-
For text on black
#5A7B7B 4.55:1
Lightening its OKLCH lightness from 0.40 to 0.56 reaches 4.55:1 on black, keeping the hue.
Checking another pair? Use the Contrast Checker.
Studio
Adjust #2F4F4F live
Move lightness, chroma and hue in OKLCH, or drag on the map. The map is every lightness and chroma at the current hue: sRGB inside the solid area, Display P3 out to the dashed line.
Scale
Shades and tints of #2F4F4F
Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #2F4F4F sits at step 800.
Under each step, white and black text on it; a bold figure passes 4.5:1.
Gamut
How vivid #2F4F4F can get
At its lightness and hue, sRGB reaches OKLCH chroma 0.069; #2F4F4F uses 55% of it. Display P3, which many recent phones and laptops show, reaches 0.092 there: 34% more.
- sRGB
- Display P3
- Rec. 2020
- Dominant wavelength
- OKLCH chroma
- 0.038
- sRGB edge
- 0.069
- Display P3 edge
- 0.092
- Rec. 2020 edge
- 0.150
- Dominant wavelength
- 491 nm
- Excitation purity
- 19%
- Chromaticity
- x 0.2617, y 0.3289
- This color#2F4F4F
- Most vivid in sRGB#005454
- Most vivid in Display P3oklch(0.403 0.092 195.8)
On a screen without Display P3 the last tile shows the sRGB edge instead.
.accent {
color: #2f4f4f;
}
@media (color-gamut: p3) {
.accent { color: color(display-p3 0 0.334 0.343); }
}
Mixing
Mixing #2F4F4F
Each row is the same mix worked out in a different space, with the halfway color at its end. sRGB, which older CSS gradients use, can sag gray or dark in the middle; OKLab keeps the lightness steps even; OKLCH holds chroma and hue as it goes.
White #FFFFFF
- sRGB50%#97A7A7
- OKLab50%#92A3A3
- OKLCH50%#92A3A3
Black #000000
- sRGB50%#182828
- OKLab50%#0C1919
- OKLCH50%#0C1919
Its complement #5B4042
- sRGB50%#454849
- OKLab50%#484849
- OKLCH50%#46465C
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #2f4f4f, white);
color: color-mix(in oklch, #2f4f4f 50%, white);
In use
#2F4F4F in an interface
A button, a link, a heading, a focused field, an icon and a chart line in this color, on a light page and a dark one. Each check is a WCAG 2 contrast minimum: 1.4.3 for text, 1.4.11 for the rest.
Light page
- Button labelText, 4.5:18.92:1 Passes
- Link and body-size textText, 4.5:18.92:1 Passes
- Large headingLarge text, 3:18.92:1 Passes
- Icons, borders and focus ringsNon-text, 3:18.92:1 Passes
Dark page
- Button labelText, 4.5:18.92:1 Passes
- Link and body-size textText, 4.5:12.09:1 Fails
- Large headingLarge text, 3:12.09:1 Fails
- Icons, borders and focus ringsNon-text, 3:12.09:1 Fails
For text on this page, the nearest shade that passes is #618382 4.52:1
Color vision
How #2F4F4F looks with color blindness
Deuteranopia changes it most, ΔE2000 13.2; tritanopia changes it least, 3.6.
Simulated with Machado et al. (2009) at full severity, in linear light.
Simulate a whole page What each type sees-
Protanopia
No working red (long-wavelength) cones
#4B4C4F ΔE2000 13.0
Distinct
Reads as dark gray
-
Deuteranopia
No working green (medium-wavelength) cones
#45484F ΔE2000 13.2
Distinct
Reads as dark gray
-
Tritanopia
No working blue (short-wavelength) cones
#22514F ΔE2000 3.6
Close match
Reads as dark muted teal
-
Achromatopsia
No cone color vision; lightness only
#4A4A4A ΔE2000 12.8
Distinct
Reads as dark gray
Pairing check
Checked against its complement, #5B4042. Their lightness contrast is only 1.04:1, so where hue collapses, add a label, icon or pattern.
| Vision | The pair | ΔE2000 | Verdict |
|---|---|---|---|
| Normal vision | #2F4F4F · #5B4042 | 31.7 | Stays distinct |
| Protanopia | #4B4C4F · #454442 | 4.2 | Easily confused |
| Deuteranopia | #45484F · #4B4942 | 8.7 | Harder to tell apart |
| Tritanopia | #22514F · #603E41 | 36.1 | Stays distinct |
| Achromatopsia | #4A4A4A · #474747 | 1.0 | Easily confused |
Harmony
Color harmonies for #2F4F4F
Its complement is #5B4042, a dark grayish wine, on the warm side of the wheel.
Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.
Open the Harmony Studio- Base#2F4F4F
- Complement#5B4042
Complementary
Open in Harmony Studio- −30°#354F44
- Base#2F4F4F
- +30°#324D58
Analogous
Open in Harmony Studio- Base#2F4F4F
- +120°#514257
- +240°#544631
Triadic
Open in Harmony Studio- Base#2F4F4F
- +150°#58404D
- +210°#5A4237
Split-complementary
Open in Harmony StudioCode
Design tokens
Ready-to-paste tokens in six formats. Rename them to fit your system.
:root {
--color-darkslategray: #2f4f4f;
}
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
darkslategray: '#2f4f4f',
},
},
},
};
/* app.css — Tailwind CSS v4 */
@import "tailwindcss";
@theme {
--color-darkslategray: oklch(0.403 0.038 195.8);
}
{
"color": {
"darkslategray": {
"$type": "color",
"$value": {
"colorSpace": "srgb",
"components": [0.1843, 0.3098, 0.3098],
"hex": "#2f4f4f"
},
"$description": "CSS named color darkslategray"
}
}
}
import SwiftUI
enum Palette {
static let darkslategray = Color(.sRGB, red: 0.184, green: 0.310, blue: 0.310, opacity: 1)
}
import androidx.compose.ui.graphics.Color
object Palette {
val Darkslategray = Color(0xFF2F4F4F)
}
Matches
The nearest match in each system
The closest CSS name, Tailwind shade, RAL Classic paint and Crayola crayon by ΔE2000; under 2 is hard to tell apart side by side. RAL and Crayola values approximate physical colors.
Tools
Open #2F4F4F in the tools
Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.
- Color InspectorEvery format, its names, contrast and color vision in one panel.
- Contrast SystemBlack and white text on this color, with fixes in both directions.
- Harmony StudioPalettes built from this color, walked to a contrast target if you ask.
- Color Space ConverterThe same color in 34 notations, with its gamut headroom.
- Color Name FinderThe nearest of 1,055 color names by ΔE2000.