Tailwind CSS v4 default palette
Tailwind gray-500: #6A7282
In Tailwind CSS v4, gray-500 is defined as --color-gray-500: oklch(55.1% 0.027 264.364), which is #6A7282 in hex and rgb(106, 114, 130): a medium-dark, grayish blue. In Tailwind v3, gray-500 was #6B7280.
In OKLCH, gray-500 has a lightness of 55.1%, chroma 0.027 and hue 264.4°.
The value fits inside sRGB, so the hex #6A7282 represents it without loss on any screen.
In v3, gray-500 was #6B7280. The v4 value is ΔE OK 0.4 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-500
| Tailwind v4 token | --color-gray-500 |
|---|---|
| OKLCH (source value) | oklch(55.1% 0.027 264.364) |
| HEX | #6A7282 |
| RGB | rgb(106, 114, 130) |
| HSL | hsl(220, 10%, 46%) |
| HWB | hwb(220 42% 49%) |
| CMYK (naive, no ICC profile) | cmyk(18%, 12%, 0%, 49%) |
| Decimal | 6,976,130 |
| Tailwind v3 hex | #6B7280 |
| Utility classes | bg-gray-500, text-gray-500, border-gray-500 |
Tailwind gray scale
Contrast and accessibility
On gray-500, white text has a contrast ratio of 4.83:1 and passes AA for normal text; black text reaches 4.34: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.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on gray-500 | 4.34:1 | Fail | Pass | Fail | Fail | 30.5 |
| White text on gray-500 | 4.83:1 | Pass | Pass | Fail | Pass | −79.0 |
| Gray-500 text on white | 4.83:1 | Pass | Pass | Fail | Pass | 73.6 |
| Gray-500 text on black | 4.34:1 | Fail | Pass | Fail | Fail | −28.1 |
Tints and shades
Each step mixes var(--color-gray-500) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-gray-500), white 25%) in CSS.
Tints (mixed with white)
- 5%
#717988 - 15%
#808795 - 25%
#8f95a1 - 35%
#9ea3ae - 45%
#adb1ba - 55%
#bcc0c7 - 65%
#cbced3 - 75%
#dadce0 - 85%
#e9eaec - 95%
#f8f8f9
Shades (mixed with black)
- 5%
#656c7c - 15%
#5a616f - 25%
#505662 - 35%
#454a55 - 45%
#3a3f48 - 55%
#30333a - 65%
#25282e - 75%
#1b1d21 - 85%
#101114 - 95%
#050607
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, gray-500's complementary color is #797160 (close to dimgray), its analogous colors are #637580 and #726F80, and its triadic partners are #816C6A and #697668. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #797160 |
| Analogous | −30°, +30° | #637580#726f80 |
| Triadic | +120°, +240° | #816c6a#697668 |
| Split-complementary | +150°, +210° | #7f6e63#717462 |
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-500 is close to neutral: its OKLCH chroma is only 0.027, so its temperature comes from context. The faint 220° 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.
Code snippets
<div class="bg-gray-500 text-white">...</div>
<p class="text-gray-500 border-gray-500">...</p>.element {
color: var(--color-gray-500);
background-color: oklch(55.1% 0.027 264.364);
border-color: #6a7282;
outline-color: rgb(106 114 130);
}import SwiftUI
extension Color {
static let gray500 = Color(red: 0.416, green: 0.447, blue: 0.510)
}import androidx.compose.ui.graphics.Color
val Gray500 = Color(0xFF6A7282)import 'package:flutter/material.dart';
const gray500 = Color(0xFF6A7282);<!-- res/values/colors.xml -->
<color name="gray_500">#6A7282</color>Frequently asked questions
- What is the hex code for Tailwind gray-500?
- In Tailwind CSS v4, gray-500 is oklch(55.1% 0.027 264.364), which converts to #6A7282 (rgb(106, 114, 130)) in sRGB. In Tailwind v3 the same name was #6B7280.
- What is the difference between gray-500 in Tailwind v3 and v4?
- v3 used the hex #6B7280; v4 redefined the palette in OKLCH as oklch(55.1% 0.027 264.364). In v3, gray-500 was #6B7280. The v4 value is ΔE OK 0.4 away, below the point where most people can tell them apart.
- How do I use gray-500 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-gray-500). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on gray-500?
- White text on gray-500 has a contrast ratio of 4.83:1, which passes AA for normal text but not AAA under WCAG 2.2. Black text reaches 4.34:1 and passes AA only for large text (24 px, or 18.66 px bold, and up). In APCA terms that is Lc −79.0 for white and Lc 30.5 for black.
- Which CSS named color is closest to gray-500?
- The closest is dimgray (#696969) at ΔE OK 4.1, followed by slategray and gray.
Last reviewed by Arielton Oberek.