Gray color (#808080)
#808080 (Gray) is a gray colour. It is rgb(128, 128, 128) in RGB and hsl(0, 0%, 50%) in HSL. Text in black reads better on it: the contrast is 5.32:1 against black and 3.95: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{#808080}:\quad R=\mathrm{80}_{16}=128,\ G=\mathrm{80}_{16}=128,\ B=\mathrm{80}_{16}=128 - 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{#808080} - 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{#808080} = \mathrm{rgb}(128, 128, 128) \]
\[ \mathrm{#808080}:\quad R=\mathrm{80}_{16}=128,\ G=\mathrm{80}_{16}=128,\ B=\mathrm{80}_{16}=128 \]
\[ H=0^\circ,\quad S=0\%,\quad L=50\% \]
\[ 0^\circ + 180^\circ = 180^\circ ;\Rightarrow; \mathrm{#808080} \]
\[ \text{contrast} = \frac{L_1+0.05}{L_2+0.05} = 3.95:1\ \text{(on white)} \]Gray in every colour format
| Format | Value |
|---|---|
| HEX | #808080 |
| RGB | rgb(128, 128, 128) |
| RGB (percent) | rgb(50.2%, 50.2%, 50.2%) |
| HSL | hsl(0, 0%, 50%) |
| HSV / HSB | hsv(0, 0%, 50%) |
| CMYK | cmyk(0%, 0%, 0%, 50%) |
| Decimal | 8421504 |
| Description | gray |
| CSS name | gray |
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 | 3.95:1 | fail | pass | fail | fail |
| Black text | 5.32:1 | pass | pass | fail | pass |
Shades and tints
| Kind | Hex codes (darkest to lightest) |
|---|---|
| Shades (mixed with black) | #151515 #2B2B2B #404040 #555555 #6B6B6B |
| This colour | #808080 |
| Tints (mixed with white) | #959595 #AAAAAA #C0C0C0 #D5D5D5 #EAEAEA |
How it looks with colour blindness
| Type | Hex | Distance from the original |
|---|---|---|
| Protanopia | #808080 | 0 |
| Deuteranopia | #808080 | 0 |
| Tritanopia | #808080 | 0 |
| Grayscale | #808080 | - |
Nearest named colours
| Name | Hex |
|---|---|
| Dim gray | #696969 |
| Slate gray | #708090 |
| Light slate gray | #778899 |
| Dark gray | #A9A9A9 |
Questions
What is the RGB value of #808080?
rgb(128, 128, 128): red 128, green 128, blue 128.
What is the HSL value of #808080?
hsl(0, 0%, 50%): a hue of 0°, 0% saturation and 50% lightness.
What is the complementary colour of #808080?
#808080, found by turning the hue by 180°. The inverted colour (each channel subtracted from 255) is #7F7F7F.
Should I use white or black text on #808080?
Black. White gives 3.95:1 and black 5.32:1; the better one passes WCAG AA for normal text.
What is the CMYK value of #808080?
cmyk(0%, 0%, 0%, 50%). This is a simple formula conversion; printed colours depend on the printer profile.
Is #808080 a named colour?
Yes: it is the CSS colour name "gray".