Skip to content

CSS named color

LightGrey #D3D3D3

LightGrey (CSS keyword lightgrey) has the hex code #D3D3D3 and the RGB value rgb(211, 211, 211): a very light neutral gray.

LightGrey#D3D3D3

British spelling of lightgray, same value (#d3d3d3). Like the other grey spellings, it was standardized alongside the gray form for compatibility.

The keyword lightgray has exactly the same value (#D3D3D3); browsers treat them as the same color.

Color codes for LightGrey

Color codes for LightGrey
CSS keywordlightgrey
HEX#D3D3D3
RGBrgb(211, 211, 211)
HSLhsl(0, 0%, 83%)
HWBhwb(0 83% 17%)
OKLCHoklch(86.7% 0 0)
CMYK (naive, no ICC profile)cmyk(0%, 0%, 0%, 17%)
Decimal13,882,323
Hue familyGrays and black
Same value aslightgray

Contrast and accessibility

On lightgrey, black text has a contrast ratio of 14.02:1 and passes AAA at any text size; white text reaches 1.49: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 lightgrey14.02:1PassPassPassPass80.4
White text on lightgrey1.49:1FailFailFailFail−26.5
Lightgrey text on white1.49:1FailFailFailFail23.3
Lightgrey text on black14.02:1PassPassPassPass−79.9

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #d5d5d5
  2. 15%
    #dadada
  3. 25%
    #dedede
  4. 35%
    #e2e2e2
  5. 45%
    #e7e7e7
  6. 55%
    #ebebeb
  7. 65%
    #f0f0f0
  8. 75%
    #f4f4f4
  9. 85%
    #f8f8f8
  10. 95%
    #fdfdfd

Shades (mixed with black)

  1. 5%
    #c8c8c8
  2. 15%
    #b3b3b3
  3. 25%
    #9e9e9e
  4. 35%
    #898989
  5. 45%
    #747474
  6. 55%
    #5f5f5f
  7. 65%
    #4a4a4a
  8. 75%
    #353535
  9. 85%
    #202020
  10. 95%
    #0b0b0b

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, lightgrey's complementary color is #D3D3D3 (close to lightgray), its analogous colors are #D3D3D3 and #D3D3D3, and its triadic partners are #D3D3D3 and #D3D3D3. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#d3d3d3
Analogous−30°, +30°#d3d3d3#d3d3d3
Triadic+120°, +240°#d3d3d3#d3d3d3
Split-complementary+150°, +210°#d3d3d3#d3d3d3

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?

LightGrey is close to neutral: its OKLCH chroma is only 0.000, 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
gainsboro#dcdcdc2.8
lightblue#add8e65.0
powderblue#b0e0e65.1

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
neutral-300#d4d4d40.3
stone-300#d6d3d10.5
taupe-300#d8d2d00.7

Code snippets

CSS
.element {
  color: lightgrey;
  background-color: #d3d3d3;
  border-color: rgb(211 211 211);
  outline-color: oklch(86.7% 0 0);
}
Tailwind CSS
<div class="bg-[#d3d3d3] text-black">...</div>

/* or register it once in your CSS (Tailwind v4) */
@theme {
  --color-lightgrey: #d3d3d3;
}
/* then use bg-lightgrey, text-lightgrey, border-lightgrey */
SwiftUI
import SwiftUI

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

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

const lightgrey = Color(0xFFD3D3D3);
Android XML
<!-- res/values/colors.xml -->
<color name="lightgrey">#D3D3D3</color>

Frequently asked questions

What is the hex code for lightgrey?
The hex code for lightgrey is #D3D3D3. The same color is rgb(211, 211, 211), hsl(0, 0%, 83%) and oklch(86.7% 0 0), and in CSS you can also write the keyword lightgrey directly.
Is lightgrey a warm or cool color?
LightGrey is close to neutral: its OKLCH chroma is only 0.000, so its temperature comes from context. It has no perceptible hue.
What colors go with lightgrey?
Rotating the hue in OKLCH while keeping lightness and chroma, lightgrey's complementary color is #D3D3D3 (close to lightgray), its analogous colors are #D3D3D3 and #D3D3D3, and its triadic partners are #D3D3D3 and #D3D3D3. For text on top, black gives the higher contrast.
Can you use white text on lightgrey?
White text on lightgrey has a contrast ratio of 1.49:1, which fails AA even for large text under WCAG 2.2. Black text reaches 14.02:1 and passes both AA and AAA. In APCA terms that is Lc −26.5 for white and Lc 80.4 for black.
Is lightgrey the same as lightgray?
Yes. Both keywords are #D3D3D3 (rgb(211, 211, 211)). CSS Color 4 keeps both for compatibility, so use whichever your codebase already uses.

Last reviewed by Arielton Oberek.