Gainsboro color (#DCDCDC)
#DCDCDC (Gainsboro) is a light gray colour. It is rgb(220, 220, 220) in RGB and hsl(0, 0%, 86%) in HSL. Text in black reads better on it: the contrast is 15.31:1 against black and 1.37:1 against white.
How to work it out
- 1
A hex code is three pairs of base-16 digits: red, green and blue, from 00 (none) to FF (full).
\mathrm{#DCDCDC}:\quad R=\mathrm{DC}_{16}=220,\ G=\mathrm{DC}_{16}=220,\ B=\mathrm{DC}_{16}=220 - 2
HSL describes the same colour as a hue angle on the colour wheel (0° red, 120° green, 240° blue), a saturation and a lightness.
- 3
The complementary colour sits opposite on the wheel: add 180° to the hue.
0^\circ + 180^\circ = 180^\circ ;\Rightarrow; \mathrm{#DCDCDC} - 4
Contrast is the ratio of the lighter to the darker relative luminance, each plus 0.05. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text (AA).
LaTeX source of the formulas on this page
\[ \mathrm{#DCDCDC} = \mathrm{rgb}(220, 220, 220) \]
\[ \mathrm{#DCDCDC}:\quad R=\mathrm{DC}_{16}=220,\ G=\mathrm{DC}_{16}=220,\ B=\mathrm{DC}_{16}=220 \]
\[ H=0^\circ,\quad S=0\%,\quad L=86\% \]
\[ 0^\circ + 180^\circ = 180^\circ ;\Rightarrow; \mathrm{#DCDCDC} \]
\[ \text{contrast} = \frac{L_1+0.05}{L_2+0.05} = 1.37:1\ \text{(on white)} \]Gainsboro in every colour format
| Format | Value |
|---|---|
| HEX | #DCDCDC |
| RGB | rgb(220, 220, 220) |
| RGB (percent) | rgb(86.3%, 86.3%, 86.3%) |
| HSL | hsl(0, 0%, 86%) |
| HSV / HSB | hsv(0, 0%, 86%) |
| CMYK | cmyk(0%, 0%, 0%, 14%) |
| Decimal | 14474460 |
| Description | light gray |
| CSS name | gainsboro |
Text contrast (WCAG)
| Background of this colour with… | Contrast | AA normal (4.5) | AA large (3) | AAA normal (7) | AAA large (4.5) |
|---|---|---|---|---|---|
| White text | 1.37:1 | fail | fail | fail | fail |
| Black text | 15.31:1 | pass | pass | pass | pass |
Shades and tints
| Kind | Hex codes (darkest to lightest) |
|---|---|
| Shades (mixed with black) | #252525 #494949 #6E6E6E #939393 #B7B7B7 |
| This colour | #DCDCDC |
| Tints (mixed with white) | #E2E2E2 #E8E8E8 #EEEEEE #F3F3F3 #F9F9F9 |
How it looks with colour blindness
| Type | Hex | Distance from the original |
|---|---|---|
| Protanopia | #DCDCDC | 0 |
| Deuteranopia | #DCDCDC | 0 |
| Tritanopia | #DCDCDC | 0 |
| Grayscale | #DCDCDC | - |
Nearest named colours
| Name | Hex |
|---|---|
| Light gray | #D3D3D3 |
| White smoke | #F5F5F5 |
| Linen | #FAF0E6 |
| Silver | #C0C0C0 |
Questions
What is the RGB value of #DCDCDC?
rgb(220, 220, 220): red 220, green 220, blue 220.
What is the HSL value of #DCDCDC?
hsl(0, 0%, 86%): a hue of 0°, 0% saturation and 86% lightness.
What is the complementary colour of #DCDCDC?
#DCDCDC, found by turning the hue by 180°. The inverted colour (each channel subtracted from 255) is #232323.
Should I use white or black text on #DCDCDC?
Black. White gives 1.37:1 and black 15.31:1; the better one passes WCAG AA for normal text.
What is the CMYK value of #DCDCDC?
cmyk(0%, 0%, 0%, 14%). This is a simple formula conversion; printed colours depend on the printer profile.
Is #DCDCDC a named colour?
Yes: it is the CSS colour name "gainsboro".