Gainsboro
Gainsboro is a light gray with no tint at all. Hex code #DCDCDC.
Color codes
- CSS name
gainsboro - HEX
#DCDCDC - RGB
rgb(220 220 220) - HSL
hsl(0 0% 86%) - HSB / HSV
hsb(0, 0%, 86%) - OKLCH
oklch(89.4% 0 0) - CMYK
cmyk(0%, 0%, 0%, 14%)
White text
1.37:1 · fails WCAG
Black text
15.31:1 · passes WCAG AAA
Shades
Tones
About this color
Gainsboro in CSS and design
Gainsboro is a light gray with no tint at all. Gainsboro is one of the extended color keywords, which CSS adopted from the X11 color names used on Unix workstations.
Use it in CSS by name or by any of its codes; these all give the same color:
color: gainsboro;
color: #DCDCDC;
color: rgb(220 220 220);
color: hsl(0 0% 86%);For text on gainsboro, black reads best. Check other combinations with the contrast checker, or browse all CSS color names.
More tools
Work with this color
- Color picker and converterPick a color and get HEX, RGB, HSL, HSB, CMYK and OKLCH, plus shades and harmonies.
- Contrast checkerCheck text and background colors against WCAG AA and AAA, and fix failing ones.
- CSS color namesAll 148 named colors with hex codes, shades, contrast and matching palettes.
- Palette generatorBuild a color palette from harmony rules, with shades and CSS variables.
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), in HSL hsl(0 0% 86%). For print, cmyk(0%, 0%, 0%, 14%) is a starting point, but CMYK depends on paper and ink, so check with your printer.
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.
Which colors go with gainsboro?
As a neutral, gainsboro goes with almost any color. It works well as a background, border or text color next to a vivid accent, and with the lighter and darker tones from its shades.