Skip to content

Gainsboro

Gainsboro is a light gray with no tint at all. Hex code #DCDCDC.

Gainsboro#DCDCDC

Gainsboro color codes

  • CSS namegainsboro
  • HEX#DCDCDC
  • RGBrgb(220, 220, 220)
  • HSLhsl(0, 0%, 86%)
  • OKLCHoklch(89.4% 0 0)
HSB and CMYK values
  • HSB / HSVhsb(0, 0%, 86%)
  • CMYKC0 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

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.

GrayHexLightnessContrast with gainsboro
Black#0000000%15.31:1
Dark slate gray#2F4F4F40%6.51:1
Dim gray#69696952%4.00:1
Slate gray#70809059%2.95:1
Gray#80808060%2.88:1
Light slate gray#77889962%2.65:1
Dark gray#A9A9A973%1.71:1
Silver#C0C0C081%1.32:1
Light gray#D3D3D387%1.09:1
Gainsboro#DCDCDC89%–
White smoke#F5F5F597%1.25:1
White#FFFFFF100%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.