Skip to content

Tailwind CSS v4 default palette

Tailwind gray-800: #1E2939

In Tailwind CSS v4, gray-800 is defined as --color-gray-800: oklch(27.8% 0.033 256.848), which is #1E2939 in hex and rgb(30, 41, 57): a very dark, grayish blue. In Tailwind v3, gray-800 was #1F2937.

gray-800#1E2939

In OKLCH, gray-800 has a lightness of 27.8%, chroma 0.033 and hue 256.8°.

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

In v3, gray-800 was #1F2937. The v4 value is ΔE OK 0.3 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-800

Color codes for gray-800
Tailwind v4 token--color-gray-800
OKLCH (source value)oklch(27.8% 0.033 256.848)
HEX#1E2939
RGBrgb(30, 41, 57)
HSLhsl(216, 31%, 17%)
HWBhwb(216 12% 78%)
CMYK (naive, no ICC profile)cmyk(47%, 28%, 0%, 78%)
Decimal1,976,633
Tailwind v3 hex#1F2937
Utility classesbg-gray-800, text-gray-800, border-gray-800

Tailwind gray scale

Contrast and accessibility

On gray-800, white text has a contrast ratio of 14.67:1 and passes AAA at any text size; black text reaches 1.43: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-8001.43:1FailFailFailFail0.0
White text on gray-80014.67:1PassPassPassPass−104.3
Gray-800 text on white14.67:1PassPassPassPass101.5
Gray-800 text on black1.43:1FailFailFailFail0.0

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #293443
  2. 15%
    #404957
  3. 25%
    #565f6b
  4. 35%
    #6d747e
  5. 45%
    #838992
  6. 55%
    #9a9fa6
  7. 65%
    #b0b4ba
  8. 75%
    #c7cace
  9. 85%
    #dddfe1
  10. 95%
    #f4f4f5

Shades (mixed with black)

  1. 5%
    #1d2736
  2. 15%
    #1a2330
  3. 25%
    #171f2b
  4. 35%
    #141b25
  5. 45%
    #11171f
  6. 55%
    #0d121a
  7. 65%
    #0b0e14
  8. 75%
    #080a0e
  9. 85%
    #050609
  10. 95%
    #020203

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, gray-800's complementary color is #322615 (close to darkslategray), its analogous colors are #152C35 and #272638, and its triadic partners are #372223 and #212C1C. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#322615
Analogous−30°, +30°#152c35#272638
Triadic+120°, +240°#372223#212c1c
Split-complementary+150°, +210°#36231a#2a2a16

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-800 is a cool color: its hue is 216° 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
midnightblue#19197011.3
darkslategray#2f4f4f13.0
navy#00008015.5

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
slate-800#1d293d0.8
mist-800#22292b2.6
zinc-800#27272a2.8

Code snippets

Tailwind CSS
<div class="bg-gray-800 text-white">...</div>
<p class="text-gray-800 border-gray-800">...</p>
CSS
.element {
  color: var(--color-gray-800);
  background-color: oklch(27.8% 0.033 256.848);
  border-color: #1e2939;
  outline-color: rgb(30 41 57);
}
SwiftUI
import SwiftUI

extension Color {
  static let gray800 = Color(red: 0.118, green: 0.161, blue: 0.224)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const gray800 = Color(0xFF1E2939);
Android XML
<!-- res/values/colors.xml -->
<color name="gray_800">#1E2939</color>

Frequently asked questions

What is the hex code for Tailwind gray-800?
In Tailwind CSS v4, gray-800 is oklch(27.8% 0.033 256.848), which converts to #1E2939 (rgb(30, 41, 57)) in sRGB. In Tailwind v3 the same name was #1F2937.
What is the difference between gray-800 in Tailwind v3 and v4?
v3 used the hex #1F2937; v4 redefined the palette in OKLCH as oklch(27.8% 0.033 256.848). In v3, gray-800 was #1F2937. The v4 value is ΔE OK 0.3 away, below the point where most people can tell them apart.
How do I use gray-800 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-gray-800). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on gray-800?
White text on gray-800 has a contrast ratio of 14.67:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 1.43:1 and fails AA even for large text. In APCA terms that is Lc −104.3 for white and Lc 0.0 for black.
Which CSS named color is closest to gray-800?
The closest is midnightblue (#191970) at ΔE OK 11.3, followed by darkslategray and navy.

Last reviewed by Arielton Oberek.