A light gray, black text passes AA

What color is gainsboro?

gainsboro is a light gray: #dcdcdc in hex, rgb(220 220 220). Black text on it reaches 15.31:1, passing WCAG AAA. Recolor (recolor.page) shows it on a real page below.

Last updated

#dcdcdcgainsboro
The keyword's value in CSS Color 4 (culori's list of named colors), converted with Recolor's color code, October 9, 2026
FormatValue
Keywordgainsboro
Hex#dcdcdc
RGBrgb(220 220 220)
HSLhsl(0 0% 86%)
OKLCHoklch(89.4% 0.000 none)
Nearest Tailwind colorolive-300 #d8d8d0, 0.018 away in OKLab
White text1.37:1: AA fails, AAA fails, large text fails
Black text15.31:1: AA passes, AAA passes, large text passes

About gainsboro

Measured in OKLCH, gainsboro comes out at lightness 89.4%, chroma 0.000 and no hue: a light gray.

HSL and OKLCH agree on how light it is, 86% and 89.4%. Of the named colors, lightgray (#d3d3d3) is the nearest, 0.028 away in OKLab; next to each other the two still differ.

Black on gainsboro reads at 15.31:1, enough for AAA body text; white reaches 1.37:1 and should stay off it. In the hue-sorted table of named colors it sits between linen and lightgray.

In Tailwind CSS 4.3.3 the nearest default color is olive-300 (#d8d8d0), 0.018 away in OKLab; for the exact color, an arbitrary value such as bg-[#dcdcdc] works.

Tints and shades

  1. #f9f9f9
  2. #f3f3f3
  3. #ededed
  4. #e8e8e8
  5. #e2e2e2
  6. #dcdcdc
  7. #acacac
  8. #7f7f7f
  9. #545454
  10. #2d2d2d
  11. #0b0b0b

From light to dark: 5 toward white and 5 toward black, mixed in OKLCH a sixth of the way at a time with the hue kept. A step that would repeat its neighbor is left out.

A palette around it

  1. #dcdcdc
  2. #49536b
  3. #9daff3
  4. #311d05
  5. #7c8b24

Around gainsboro as swatch 1, Recolor's generator made a split-complementary palette, built on the two hues beside its opposite: #49536b, #9daff3, #311d05, #7c8b24, drawn from a seed fixed by its hex. Open it in Recolor.

Using gainsboro

As a text color, gainsboro on a black page gives the same 15.31:1.

CSS
.notice {
  background-color: gainsboro; /* #dcdcdc */
  color: black; /* 15.31:1 */
}

Common questions

Does white text pass WCAG AA on gainsboro?

No. White text measures 1.37:1 on gainsboro, under AA's 4.5:1; black text measures 15.31:1 and passes.

Can gainsboro be written in OKLCH?

Yes: oklch(89.4% 0.000 none), computed from #dcdcdc. A named color is an sRGB color, so its OKLCH value converts back to the same hex.

Is there a named color close to gainsboro?

Yes: lightgray (#d3d3d3) is the nearest, 0.028 away in OKLab, then lavender at 0.045.

Sources