Skip to content

Tailwind CSS v4 default palette

Tailwind zinc-800: #27272A

In Tailwind CSS v4, zinc-800 is defined as --color-zinc-800: oklch(27.4% 0.006 286.033), which is #27272A in hex and rgb(39, 39, 42): a very dark gray with a faint blue tint. In Tailwind v3, zinc-800 was #27272A.

zinc-800#27272A

In OKLCH, zinc-800 has a lightness of 27.4%, chroma 0.006 and hue 286.0°.

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

In v3, zinc-800 was #27272A. The v4 value is ΔE OK 0.1 away, below the point where most people can tell them apart.

Tailwind zinc is a nearly neutral gray with a faint cool violet cast, sitting between the bluish gray and the hueless neutral.

Color codes for zinc-800

Color codes for zinc-800
Tailwind v4 token--color-zinc-800
OKLCH (source value)oklch(27.4% 0.006 286.033)
HEX#27272A
RGBrgb(39, 39, 42)
HSLhsl(240, 4%, 16%)
HWBhwb(240 15% 84%)
CMYK (naive, no ICC profile)cmyk(7%, 7%, 0%, 84%)
Decimal2,565,930
Tailwind v3 hex#27272A
Utility classesbg-zinc-800, text-zinc-800, border-zinc-800

Tailwind zinc scale

Contrast and accessibility

On zinc-800, white text has a contrast ratio of 14.89:1 and passes AAA at any text size; black text reaches 1.40: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 zinc-8001.40:1FailFailFailFail0.0
White text on zinc-80014.89:1PassPassPassPass−104.6
Zinc-800 text on white14.89:1PassPassPassPass101.8
Zinc-800 text on black1.40:1FailFailFailFail0.0

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #323235
  2. 15%
    #47474a
  3. 25%
    #5d5d5f
  4. 35%
    #737375
  5. 45%
    #88888a
  6. 55%
    #9e9e9f
  7. 65%
    #b3b3b4
  8. 75%
    #c9c9ca
  9. 85%
    #dfdfdf
  10. 95%
    #f4f4f4

Shades (mixed with black)

  1. 5%
    #252528
  2. 15%
    #212124
  3. 25%
    #1d1d20
  4. 35%
    #19191b
  5. 45%
    #151517
  6. 55%
    #121213
  7. 65%
    #0e0e0f
  8. 75%
    #0a0a0b
  9. 85%
    #060606
  10. 95%
    #020202

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, zinc-800's complementary color is #282824 (close to darkslategray), its analogous colors are #25282A and #292729, and its triadic partners are #2A2725 and #252827. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#282824
Analogous−30°, +30°#25282a#292729
Triadic+120°, +240°#2a2725#252827
Split-complementary+150°, +210°#292724#262825

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 zinc-800 is close to neutral: its OKLCH chroma is only 0.006, so its temperature comes from context. The faint 240° 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
darkslategray#2f4f4f13.5
midnightblue#19197013.9
navy#00008018.2

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
neutral-800#2626260.8
mist-800#22292b1.1
stone-800#2925241.2

Code snippets

Tailwind CSS
<div class="bg-zinc-800 text-white">...</div>
<p class="text-zinc-800 border-zinc-800">...</p>
CSS
.element {
  color: var(--color-zinc-800);
  background-color: oklch(27.4% 0.006 286.033);
  border-color: #27272a;
  outline-color: rgb(39 39 42);
}
SwiftUI
import SwiftUI

extension Color {
  static let zinc800 = Color(red: 0.153, green: 0.153, blue: 0.165)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const zinc800 = Color(0xFF27272A);
Android XML
<!-- res/values/colors.xml -->
<color name="zinc_800">#27272A</color>

Frequently asked questions

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

Last reviewed by Arielton Oberek.