CSS named color
Gainsboro #DCDCDC
Gainsboro is a very light gray with the hex code #DCDCDC, which converts to rgb(220, 220, 220). Open #DCDCDC in the converter to tweak it.
Gainsboro color values
| HEX | #DCDCDC |
|---|---|
| HEX (shorthand) | — |
| RGB | rgb(220, 220, 220) |
| RGBA | rgba(220, 220, 220, 1) |
| 8-digit HEX | #DCDCDCFF |
| HSL | hsl(0, 0%, 86%) |
| HSV / HSB | 0°, 0%, 86% |
| CMYK | 0%, 0%, 0%, 14% |
| RGB 0–1 | 0.863, 0.863, 0.863 |
| Decimal | 14474460 |
| CSS keyword | gainsboro |
How #DCDCDC converts to RGB
Split the hex code into three pairs and read each pair as a base-16 number: DC → 220, DC → 220, DC → 220. That gives rgb(220, 220, 220). The step-by-step guide explains the math.
Shades of Gainsboro
Mixed toward black in 10% steps. Click a swatch to copy its hex.
Tints of Gainsboro
Mixed toward white in 10% steps.
Color harmonies
Hue rotations of Gainsboro on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.
Gainsboro has no hue (saturation is 0%), so hue-based harmonies collapse to the same gray. Grays pair with any accent color — pick one from the palette generator.
Contrast and accessibility
| Text | Background | Ratio | WCAG 2.x |
|---|---|---|---|
| White | Gainsboro | 1.37:1 | Fail |
| Black | Gainsboro | 15.31:1 | AAA |
Use black text on a gainsboro background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.
Use Gainsboro in CSS
.element {
color: gainsboro; /* keyword */
background-color: #DCDCDC; /* hex */
border-color: rgb(220 220 220 / 50%); /* 50% transparent */
}
Need it semi-transparent? Append an alpha byte: #DCDCDC80 is Gainsboro at 50% opacity. See RGBA & transparency.
Similar named colors
FAQ
What is the HEX code for Gainsboro?
The CSS named color gainsboro is #DCDCDC in hexadecimal. In CSS you can write color: gainsboro; or color: #DCDCDC; — both produce the same pixel.
What is Gainsboro in RGB?
Gainsboro is rgb(220, 220, 220): red 220, green 220, blue 220 on the 0–255 scale. As normalized 0–1 floats that is (0.863, 0.863, 0.863).
Is white or black text more readable on Gainsboro?
Black text is more readable. White on #DCDCDC has a contrast ratio of 1.37:1 (Fail), black on #DCDCDC has 15.31:1 (AAA). WCAG AA needs 4.5:1 for normal text.