Skip to content

Tailwind CSS v4 default palette

Tailwind gray-50: #F9FAFB

In Tailwind CSS v4, gray-50 is defined as --color-gray-50: oklch(98.5% 0.002 247.839), which is #F9FAFB in hex and rgb(249, 250, 251): a neutral near-white. In Tailwind v3, gray-50 was #F9FAFB.

gray-50#F9FAFB

In OKLCH, gray-50 has a lightness of 98.5%, chroma 0.002 and hue 247.8°.

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

In v3, gray-50 was #F9FAFB. The v4 value is ΔE OK 0.0 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-50

Color codes for gray-50
Tailwind v4 token--color-gray-50
OKLCH (source value)oklch(98.5% 0.002 247.839)
HEX#F9FAFB
RGBrgb(249, 250, 251)
HSLhsl(210, 20%, 98%)
HWBhwb(210 98% 2%)
CMYK (naive, no ICC profile)cmyk(1%, 0%, 0%, 2%)
Decimal16,382,715
Tailwind v3 hex#F9FAFB
Utility classesbg-gray-50, text-gray-50, border-gray-50

Tailwind gray scale

Contrast and accessibility

On gray-50, black text has a contrast ratio of 20.09:1 and passes AAA at any text size; white 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-5020.09:1PassPassPassPass103.0
White text on gray-501.04:1FailFailFailFail0.0
Gray-50 text on white1.04:1FailFailFailFail0.0
Gray-50 text on black20.09:1PassPassPassPass−104.5

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #f9fafb
  2. 15%
    #fafbfc
  3. 25%
    #fbfbfc
  4. 35%
    #fbfcfc
  5. 45%
    #fcfcfd
  6. 55%
    #fcfdfd
  7. 65%
    #fdfdfe
  8. 75%
    #fefefe
  9. 85%
    #fefefe
  10. 95%
    #ffffff

Shades (mixed with black)

  1. 5%
    #edeeee
  2. 15%
    #d4d5d5
  3. 25%
    #bbbcbc
  4. 35%
    #a2a3a3
  5. 45%
    #898a8a
  6. 55%
    #707071
  7. 65%
    #575858
  8. 75%
    #3e3f3f
  9. 85%
    #252626
  10. 95%
    #0c0d0d

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, gray-50's complementary color is #FBFAF9 (close to snow), its analogous colors are #F9FAFB and #FAFAFB, and its triadic partners are #FBF9FA and #FAFAF9. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#fbfaf9
Analogous−30°, +30°#f9fafb#fafafb
Triadic+120°, +240°#fbf9fa#fafaf9
Split-complementary+150°, +210°#fbfaf9#fafaf9

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-50 is close to neutral: its OKLCH chroma is only 0.002, so its temperature comes from context. It has no perceptible hue.

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
snow#fffafa0.8
ghostwhite#f8f8ff0.9
mintcream#f5fffa1.4

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
slate-50#f8fafc0.1
zinc-50#fafafa0.2
neutral-50#fafafa0.2

Code snippets

Tailwind CSS
<div class="bg-gray-50 text-black">...</div>
<p class="text-gray-50 border-gray-50">...</p>
CSS
.element {
  color: var(--color-gray-50);
  background-color: oklch(98.5% 0.002 247.839);
  border-color: #f9fafb;
  outline-color: rgb(249 250 251);
}
SwiftUI
import SwiftUI

extension Color {
  static let gray50 = Color(red: 0.976, green: 0.980, blue: 0.984)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const gray50 = Color(0xFFF9FAFB);
Android XML
<!-- res/values/colors.xml -->
<color name="gray_50">#F9FAFB</color>

Frequently asked questions

What is the hex code for Tailwind gray-50?
In Tailwind CSS v4, gray-50 is oklch(98.5% 0.002 247.839), which converts to #F9FAFB (rgb(249, 250, 251)) in sRGB. In Tailwind v3 the same name was #F9FAFB.
What is the difference between gray-50 in Tailwind v3 and v4?
v3 used the hex #F9FAFB; v4 redefined the palette in OKLCH as oklch(98.5% 0.002 247.839). In v3, gray-50 was #F9FAFB. The v4 value is ΔE OK 0.0 away, below the point where most people can tell them apart.
How do I use gray-50 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-gray-50). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on gray-50?
White text on gray-50 has a contrast ratio of 1.04:1, which fails AA even for large text under WCAG 2.2. Black text reaches 20.09:1 and passes both AA and AAA. In APCA terms that is Lc 0.0 for white and Lc 103.0 for black.
Which CSS named color is closest to gray-50?
The closest is snow (#FFFAFA) at ΔE OK 0.8, followed by ghostwhite and mintcream.

Last reviewed by Arielton Oberek.