Gainsboro
Gainsboro is a light gray with no tint at all. Hex code #DCDCDC.
Gainsboro color codes
- CSS name
gainsboro - HEX
#DCDCDC - RGB
rgb(220, 220, 220) - HSL
hsl(0, 0%, 86%) - OKLCH
oklch(89.4% 0 0)
HSB and CMYK values
- HSB / HSV
hsb(0, 0%, 86%) - CMYK
C0 M0 Y0 K14
White text
1.37:1 · fails WCAG
Black text
15.31:1 · passes WCAG AAA
Shades of gainsboro
A darker shade of gainsboro is #B8B8B8 (200).
Colors that go with gainsboro
Tones
Gainsboro has no complementary color: grays, black and white have no hue to turn around the color wheel.
Click a color to copy its hex code.
Colors similar to gainsboro
- Light gray#D3D3D3
Slightly darker
- Linen#FAF0E6
Lighter, a faint orange tint
- White smoke#F5F5F5
Lighter
- Lavender blush#FFF0F5
Lighter, a faint pink tint
- Alice blue#F0F8FF
Lighter, a faint blue tint
- Seashell#FFF5EE
Lighter, a faint orange tint
Each compared with gainsboro.
About this color
Gainsboro in CSS and design
Gainsboro is one of the extended color keywords, which mostly go back to the X11 color names of Unix systems. These four lines all give the same gainsboro:
color: gainsboro;
color: #DCDCDC;
color: rgb(220, 220, 220);
color: hsl(0, 0%, 86%);Gainsboro and the other grays
Gainsboro sits between light gray (#D3D3D3) and white smoke (#F5F5F5) in lightness. As text on gainsboro, black and dark slate gray reach the 4.5:1 contrast that WCAG AA asks for.
| Gray | Hex | Lightness | Contrast with gainsboro |
|---|---|---|---|
| Black | #000000 | 0% | 15.31:1 |
| Dark slate gray | #2F4F4F | 40% | 6.51:1 |
| Dim gray | #696969 | 52% | 4.00:1 |
| Slate gray | #708090 | 59% | 2.95:1 |
| Gray | #808080 | 60% | 2.88:1 |
| Light slate gray | #778899 | 62% | 2.65:1 |
| Dark gray | #A9A9A9 | 73% | 1.71:1 |
| Silver | #C0C0C0 | 81% | 1.32:1 |
| Light gray | #D3D3D3 | 87% | 1.09:1 |
| Gainsboro | #DCDCDC | 89% | – |
| White smoke | #F5F5F5 | 97% | 1.25:1 |
| White | #FFFFFF | 100% | 1.37:1 |
Lightness is OKLCH lightness, which follows how light a color looks.
Frequently asked questions
What is the hex code for gainsboro?
#DCDCDC. In CSS you can also use the keyword gainsboro, which works in every browser.
What is gainsboro in RGB and HSL?
In RGB it is rgb(220, 220, 220) and in HSL hsl(0, 0%, 86%). In CMYK it is about C0 M0 Y0 K14, though printed colors vary with paper and ink.
Should I use black or white text on gainsboro?
Black text works better: it has a contrast ratio of 15.31:1 and passes WCAG AAA. White text reaches 1.37:1.
What is the complementary color of gainsboro?
Gainsboro has no complementary color. A complement is found by turning a color's hue halfway around the color wheel, and grays, black and white have no hue to turn.
Which colors go with gainsboro?
As a neutral, gainsboro goes with almost any color. Its own tones, from #4D4D4D to #DCDCDC, make a calm palette, and a single vivid accent stands out against it.