CSS named color
SlateGray #708090
SlateGray (CSS keyword slategray) has the hex code #708090 and the RGB value rgb(112, 128, 144): a medium, grayish sky blue.
A medium blue-gray (#708090), the color of slate rock. It is a popular cool gray for secondary text and icons.
The keyword slategrey has exactly the same value (#708090); browsers treat them as the same color.
Color codes for SlateGray
| CSS keyword | slategray |
|---|---|
| HEX | #708090 |
| RGB | rgb(112, 128, 144) |
| HSL | hsl(210, 13%, 50%) |
| HWB | hwb(210 44% 44%) |
| OKLCH | oklch(59.3% 0.031 248.3) |
| CMYK (naive, no ICC profile) | cmyk(22%, 11%, 0%, 44%) |
| Decimal | 7,372,944 |
| Hue family | Grays and black |
| Same value as | slategrey |
Contrast and accessibility
On slategray, black text has a contrast ratio of 5.17:1 and passes AA for normal text; white text reaches 4.05:1.
WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on slategray | 5.17:1 | Pass | Pass | Fail | Pass | 36.3 |
| White text on slategray | 4.05:1 | Fail | Pass | Fail | Fail | −73.3 |
| Slategray text on white | 4.05:1 | Fail | Pass | Fail | Fail | 67.8 |
| Slategray text on black | 5.17:1 | Pass | Pass | Fail | Pass | −33.9 |
Tints and shades
Each step mixes slategray with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, slategray, white 25%) in CSS.
Tints (mixed with white)
- 5%
#778696 - 15%
#8593a1 - 25%
#94a0ac - 35%
#a2acb7 - 45%
#b0b9c2 - 55%
#bfc6cd - 65%
#cdd3d8 - 75%
#dbdfe3 - 85%
#eaecee - 95%
#f8f9f9
Shades (mixed with black)
- 5%
#6a7a89 - 15%
#5f6d7a - 25%
#54606c - 35%
#49535e - 45%
#3e464f - 55%
#323a41 - 65%
#272d32 - 75%
#1c2024 - 85%
#111316 - 95%
#060607
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, slategray's complementary color is #8B7B6B (close to gray), its analogous colors are #6A838A and #797D91, and its triadic partners are #8F777A and #78826E. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #8b7b6b |
| Analogous | −30°, +30° | #6a838a#797d91 |
| Triadic | +120°, +240° | #8f777a#78826e |
| Split-complementary | +150°, +210° | #8f7871#837f6a |
Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.
Warm or cool?
SlateGray is a cool color: its hue is 210° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
Nearest named and Tailwind colors
Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.
Code snippets
.element {
color: slategray;
background-color: #708090;
border-color: rgb(112 128 144);
outline-color: oklch(59.3% 0.031 248.3);
}<div class="bg-[#708090] text-black">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-slategray: #708090;
}
/* then use bg-slategray, text-slategray, border-slategray */import SwiftUI
extension Color {
static let slategray = Color(red: 0.439, green: 0.502, blue: 0.565)
}import androidx.compose.ui.graphics.Color
val Slategray = Color(0xFF708090)import 'package:flutter/material.dart';
const slategray = Color(0xFF708090);<!-- res/values/colors.xml -->
<color name="slategray">#708090</color>Frequently asked questions
- What is the hex code for slategray?
- The hex code for slategray is #708090. The same color is rgb(112, 128, 144), hsl(210, 13%, 50%) and oklch(59.3% 0.031 248.3), and in CSS you can also write the keyword slategray directly.
- Is slategray a warm or cool color?
- SlateGray is a cool color: its hue is 210° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
- What colors go with slategray?
- Rotating the hue in OKLCH while keeping lightness and chroma, slategray's complementary color is #8B7B6B (close to gray), its analogous colors are #6A838A and #797D91, and its triadic partners are #8F777A and #78826E. For text on top, black gives the higher contrast.
- Can you use white text on slategray?
- White text on slategray has a contrast ratio of 4.05:1, which passes AA only for large text (24 px, or 18.66 px bold, and up) under WCAG 2.2. Black text reaches 5.17:1 and passes AA for normal text but not AAA. In APCA terms that is Lc −73.3 for white and Lc 36.3 for black.
- Is slategray the same as slategrey?
- Yes. Both keywords are #708090 (rgb(112, 128, 144)). CSS Color 4 keeps both for compatibility, so use whichever your codebase already uses.
Last reviewed by Arielton Oberek.