CSS named colour
Dark Slate Gray
#2f4f4f
A CSS named colour: darkslategray is valid anywhere a colour is expected.
- RGB
- rgb(47 79 79)
- HSL
- 180°, 25%, 25%
- OKLCh
- 40.3% 0.038 195.8
Dark Slate Gray in every format
Web & CSSThe everyday formats for stylesheets and design tools.
| Hex | #2f4f4f | |
|---|---|---|
| RGB | rgb(47 79 79) | |
| RGB legacy | rgb(47, 79, 79) | |
| RGB percent | rgb(18.43% 30.98% 30.98%) | |
| HSL | hsl(180 25.4% 24.7%) | |
| HSL legacy | hsl(180, 25.4%, 24.7%) | |
| HSV / HSB | hsv(180, 40.5%, 31%) | |
| HWB | hwb(180 18.4% 69%) | |
| Nearest name | darkslategray | |
| CMYK | cmyk(40.5%, 0%, 0%, 69%)Naive conversion. Real print work needs an ICC profile. |
Perceptual & wide gamutModern CSS colour spaces for uniform scales and P3 displays.
| OKLCh | oklch(40.296% 0.03772 195.758)Modern CSS colour space for even palettes — better than HSL when building scales. | |
|---|---|---|
| OKLab | oklab(40.296% -0.03631 -0.01024) | |
| CIE LCh | lch(31.141% 12.877 197.8) | |
| CIE Lab | lab(31.141% -12.261 -3.937) | |
| Display P3 | color(display-p3 0.2129 0.3066 0.3081) | |
| Rec. 2020 | color(rec2020 0.1783 0.2429 0.2482) | |
| srgb-linear | color(srgb-linear 0.0284 0.0782 0.0782)Light-linear sRGB — the same numbers a shader wants for maths. | |
| CIE XYZ (D65) | color(xyz-d65 0.0538 0.0676 0.0842) |
ShadersGLSL, HLSL and WGSL vectors in both encoded and linear form.
| GLSL vec3 — sRGB | vec3(0.184, 0.31, 0.31)Encoded values. Use when writing straight to the framebuffer. | |
|---|---|---|
| GLSL vec3 — linear | vec3(0.028, 0.078, 0.078)Light-linear values. Use for lighting, blending and mixing. | |
| GLSL vec4 — sRGB | vec4(0.184, 0.31, 0.31, 1.0) | |
| GLSL vec4 — linear | vec4(0.028, 0.078, 0.078, 1.0) | |
| GLSL ivec3 | ivec3(47, 79, 79) | |
| HLSL float3 — sRGB | float3(0.184, 0.31, 0.31) | |
| HLSL float3 — linear | float3(0.028, 0.078, 0.078) | |
| HLSL float4 — sRGB | float4(0.184, 0.31, 0.31, 1.0) | |
| HLSL half4 — sRGB | half4(0.184, 0.31, 0.31, 1.0) | |
| WGSL vec3f — sRGB | vec3f(0.184, 0.31, 0.31) | |
| WGSL vec4f — sRGB | vec4f(0.184, 0.31, 0.31, 1.0) | |
| WGSL vec3<f32> — linear | vec3<f32>(0.028, 0.078, 0.078) |
Engines & appsConstructors for Unity, Unreal, Godot, Flutter, SwiftUI and Android.
| Unity Color | new Color(0.184f, 0.31f, 0.31f, 1.0f)Color for everyday scripting (0–1). Color32 when you need whole numbers from 0 to 255. | |
|---|---|---|
| Unity Color32 | new Color32(47, 79, 79, 255) | |
| Unreal FLinearColor | FLinearColor(0.0284f, 0.0782f, 0.0782f, 1.0f)FLinearColor for materials and lighting. FColor when you need whole numbers from 0 to 255. | |
| Unreal FColor | FColor(47, 79, 79, 255)Whole numbers from 0 to 255 — use when an API asks for FColor, not FLinearColor. | |
| Godot Color | Color(0.184, 0.31, 0.31, 1) | |
| Flutter Color | Color(0xFF2F4F4F)Packed ARGB, so alpha comes first. | |
| Android Color | Color.rgb(47, 79, 79) | |
| SwiftUI Color | Color(red: 0.184, green: 0.31, blue: 0.31) | |
| UIKit UIColor | UIColor(red: 0.184, green: 0.31, blue: 0.31, alpha: 1) |
Raw valuesPacked integers and plain arrays.
| 0x hex | 0x2F4F4F | |
|---|---|---|
| 0x hex (ARGB) | 0xFF2F4F4F | |
| Array 0–1 | [0.184, 0.31, 0.31] | |
| Array 0–255 | [47, 79, 79] | |
| Decimal integer | 3100495 |
Contrast and accessibility
WCAG 2 ratios are what audits and legislation reference. APCA is shown alongside because WCAG 2 is known to misjudge mid-tone backgrounds, and it is the basis of the WCAG 3 draft.
| Pairing | WCAG 2 ratio | Level | APCA | Suitable for |
|---|---|---|---|---|
| Dark Slate Gray on white | 8.93:1 | AAA | Lc 90 | Body text at any size |
| Dark Slate Gray on black | 2.35:1 | Fail | Lc 12 | Not usable for text |
Dark Slate Gray text on a white background
Dark Slate Gray text on a black background
White text on Dark Slate Gray
Black text on Dark Slate Gray
Tonal scale
Hue held fixed while lightness walks OKLCh, ready to use as a design system ramp.
- 50#e3fefd
- 100#d8f4f4
- 200#c5e3e3
- 300#adcdcd
- 400#8fb1b1
- 500#719393
- 600#597978
- 700#446161
- 800#334d4d
- 900#253d3d
- 950#102323
Tints and shades
Mixed perceptually toward white and black, so the steps feel evenly spaced.
- Tint 1#4f6a6a
- Tint 2#708686
- Tint 3#92a3a3
- Tint 4#b5c1c0
- Tint 5#dadfdf
- Shade 1#233c3c
- Shade 2#172a2a
- Shade 3#0c1919
- Shade 4#030a0a
- Shade 5#000101
Colours that work with Dark Slate Gray
Complementary, triadic and analogous partners, rotated in OKLCh so they keep the same apparent brightness.
- #5b4042
- #514257
- #544631
- #354f44
- #324d58
Closest CSS names
darkslategrayexact matchdimgrayΔEok 0.124darkolivegreenΔEok 0.125darkslateblueΔEok 0.131darkgreenΔEok 0.134tealΔEok 0.151