Skip to content

Tailwind CSS v4 default palette

Tailwind gray-950: #030712

In Tailwind CSS v4, gray-950 is defined as --color-gray-950: oklch(13% 0.028 261.692), which is #030712 in hex and rgb(3, 7, 18): a very dark, grayish blue. In Tailwind v3, gray-950 was #030712.

gray-950#030712

In OKLCH, gray-950 has a lightness of 13.0%, chroma 0.028 and hue 261.7°.

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

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

Tailwind gray is a cool gray with a lighter blue tint than slate, the default neutral in many Tailwind projects.

Color codes for gray-950

Color codes for gray-950
Tailwind v4 token--color-gray-950
OKLCH (source value)oklch(13% 0.028 261.692)
HEX#030712
RGBrgb(3, 7, 18)
HSLhsl(224, 71%, 4%)
HWBhwb(224 1% 93%)
CMYK (naive, no ICC profile)cmyk(83%, 61%, 0%, 93%)
Decimal198,418
Tailwind v3 hex#030712
Utility classesbg-gray-950, text-gray-950, border-gray-950

Tailwind gray scale

Contrast and accessibility

On gray-950, white text has a contrast ratio of 20.13: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 gray-9501.04:1FailFailFailFail0.0
White text on gray-95020.13:1PassPassPassPass−107.8
Gray-950 text on white20.13:1PassPassPassPass105.9
Gray-950 text on black1.04:1FailFailFailFail0.0

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #10131e
  2. 15%
    #292c36
  3. 25%
    #42454d
  4. 35%
    #5b5e65
  5. 45%
    #74777d
  6. 55%
    #8e8f94
  7. 65%
    #a7a8ac
  8. 75%
    #c0c1c4
  9. 85%
    #d9dadb
  10. 95%
    #f2f3f3

Shades (mixed with black)

  1. 5%
    #030711
  2. 15%
    #03060f
  3. 25%
    #02050e
  4. 35%
    #02050c
  5. 45%
    #02040a
  6. 55%
    #010308
  7. 65%
    #010206
  8. 75%
    #010205
  9. 85%
    #000103
  10. 95%
    #000001

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, gray-950's complementary color is #0D0600 (close to black), its analogous colors are #000910 and #080511, and its triadic partners are #110404 and #030A02. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#0d0600
Analogous−30°, +30°#000910#080511
Triadic+120°, +240°#110404#030a02
Split-complementary+150°, +210°#100501#080800

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 gray-950 is close to neutral: its OKLCH chroma is only 0.028, so its temperature comes from context. The faint 224° hue gives it a slightly cool cast.

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.3
midnightblue#19197019.6
navy#00008021.3

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
slate-950#0206181.4
zinc-950#09090b2.6
mauve-950#0c090c3.0

Code snippets

Tailwind CSS
<div class="bg-gray-950 text-white">...</div>
<p class="text-gray-950 border-gray-950">...</p>
CSS
.element {
  color: var(--color-gray-950);
  background-color: oklch(13% 0.028 261.692);
  border-color: #030712;
  outline-color: rgb(3 7 18);
}
SwiftUI
import SwiftUI

extension Color {
  static let gray950 = Color(red: 0.012, green: 0.027, blue: 0.071)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const gray950 = Color(0xFF030712);
Android XML
<!-- res/values/colors.xml -->
<color name="gray_950">#030712</color>

Frequently asked questions

What is the hex code for Tailwind gray-950?
In Tailwind CSS v4, gray-950 is oklch(13% 0.028 261.692), which converts to #030712 (rgb(3, 7, 18)) in sRGB. In Tailwind v3 the same name was #030712.
What is the difference between gray-950 in Tailwind v3 and v4?
v3 used the hex #030712; v4 redefined the palette in OKLCH as oklch(13% 0.028 261.692). In v3, gray-950 was #030712. The v4 value is ΔE OK 0.1 away, below the point where most people can tell them apart.
How do I use gray-950 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-gray-950). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on gray-950?
White text on gray-950 has a contrast ratio of 20.13: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 gray-950?
The closest is black (#000000) at ΔE OK 13.3, followed by midnightblue and navy.

Last reviewed by Arielton Oberek.