Skip to content

Tailwind CSS v4 default palette

Tailwind slate-950: #020618

In Tailwind CSS v4, slate-950 is defined as --color-slate-950: oklch(12.9% 0.042 264.695), which is #020618 in hex and rgb(2, 6, 24): a very dark, muted blue. In Tailwind v3, slate-950 was #020617.

slate-950#020618

In OKLCH, slate-950 has a lightness of 12.9%, chroma 0.042 and hue 264.7°.

The value fits inside sRGB, so the hex #020618 represents it without loss on any screen.

In v3, slate-950 was #020617. The v4 value is ΔE OK 0.1 away, below the point where most people can tell them apart.

Tailwind slate is the bluest of the gray scales, a cool gray that pairs well with blue and indigo accents.

Color codes for slate-950

Color codes for slate-950
Tailwind v4 token--color-slate-950
OKLCH (source value)oklch(12.9% 0.042 264.695)
HEX#020618
RGBrgb(2, 6, 24)
HSLhsl(229, 85%, 5%)
HWBhwb(229 1% 91%)
CMYK (naive, no ICC profile)cmyk(92%, 75%, 0%, 91%)
Decimal132,632
Tailwind v3 hex#020617
Utility classesbg-slate-950, text-slate-950, border-slate-950

Tailwind slate scale

Contrast and accessibility

On slate-950, white text has a contrast ratio of 20.15:1 and passes AAA at any text size; black text reaches 1.04: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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on slate-9501.04:1FailFailFailFail0.0
White text on slate-95020.15:1PassPassPassPass−107.8
Slate-950 text on white20.15:1PassPassPassPass105.9
Slate-950 text on black1.04:1FailFailFailFail0.0

Tints and shades

Each step mixes var(--color-slate-950) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-slate-950), white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #0f1224
  2. 15%
    #282b3b
  3. 25%
    #414452
  4. 35%
    #5b5d69
  5. 45%
    #747680
  6. 55%
    #8d8f97
  7. 65%
    #a6a8ae
  8. 75%
    #c0c1c5
  9. 85%
    #d9dadc
  10. 95%
    #f2f3f3

Shades (mixed with black)

  1. 5%
    #020617
  2. 15%
    #020514
  3. 25%
    #020512
  4. 35%
    #010410
  5. 45%
    #01030d
  6. 55%
    #01030b
  7. 65%
    #010208
  8. 75%
    #010206
  9. 85%
    #000104
  10. 95%
    #000001

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, slate-950's complementary color is #0E0500 (close to black), its analogous colors are #000915 and #080416, and its triadic partners are #140202 and #000B01. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#0e0500
Analogous−30°, +30°#000915#080416
Triadic+120°, +240°#140202#000b01
Split-complementary+150°, +210°#130300#070800

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?

Tailwind slate-950 is a cool color: its hue is 229° 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.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
black#00000013.6
midnightblue#19197018.9
navy#00008020.4

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
gray-950#0307121.4
zinc-950#09090b3.9
mauve-950#0c090c4.2

Code snippets

Tailwind CSS
<div class="bg-slate-950 text-white">...</div>
<p class="text-slate-950 border-slate-950">...</p>
CSS
.element {
  color: var(--color-slate-950);
  background-color: oklch(12.9% 0.042 264.695);
  border-color: #020618;
  outline-color: rgb(2 6 24);
}
SwiftUI
import SwiftUI

extension Color {
  static let slate950 = Color(red: 0.008, green: 0.024, blue: 0.094)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Slate950 = Color(0xFF020618)
Flutter
import 'package:flutter/material.dart';

const slate950 = Color(0xFF020618);
Android XML
<!-- res/values/colors.xml -->
<color name="slate_950">#020618</color>

Frequently asked questions

What is the hex code for Tailwind slate-950?
In Tailwind CSS v4, slate-950 is oklch(12.9% 0.042 264.695), which converts to #020618 (rgb(2, 6, 24)) in sRGB. In Tailwind v3 the same name was #020617.
What is the difference between slate-950 in Tailwind v3 and v4?
v3 used the hex #020617; v4 redefined the palette in OKLCH as oklch(12.9% 0.042 264.695). In v3, slate-950 was #020617. The v4 value is ΔE OK 0.1 away, below the point where most people can tell them apart.
How do I use slate-950 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-slate-950). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on slate-950?
White text on slate-950 has a contrast ratio of 20.15:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 1.04:1 and fails AA even for large text. In APCA terms that is Lc −107.8 for white and Lc 0.0 for black.
Which CSS named color is closest to slate-950?
The closest is black (#000000) at ΔE OK 13.6, followed by midnightblue and navy.

Last reviewed by Arielton Oberek.