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
| Format | Value |
|---|---|
| Keyword | gainsboro |
| Hex | #dcdcdc |
| RGB | rgb(220 220 220) |
| HSL | hsl(0 0% 86%) |
| OKLCH | oklch(89.4% 0.000 none) |
| Nearest Tailwind color | olive-300 #d8d8d0, 0.018 away in OKLab |
| White text | 1.37:1: AA fails, AAA fails, large text fails |
| Black text | 15.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
- #f9f9f9
- #f3f3f3
- #ededed
- #e8e8e8
- #e2e2e2
- #dcdcdc
- #acacac
- #7f7f7f
- #545454
- #2d2d2d
- #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
- #dcdcdc
- #49536b
- #9daff3
- #311d05
- #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.
.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.