An exact middle gray with equal red, green and blue values at half strength. Designers and photographers use it as a neutral reference, and it is a safe base for UI elements and backgrounds.
Also known as: Middle gray, Mid gray.
The hex code for medium gray is #808080. In RGB it is rgb(128, 128, 128), in HSL hsl(0, 0%, 50%) and in CMYK 0, 0, 0, 50.
Pick a color to pair it with and see how it looks on clothes, interiors and design.
Medium gray (#808080) is a neutral, mid-tone, almost unsaturated color. It belongs to the grays family. It mixes 128 red, 128 green and 128 blue (out of 255). It is mostly used in web, UI, photography.

From lightest to darkest. Tap a shade to copy its code.
See all its shades: Color shades generator
Outfit palettes with medium gray or a very close shade, each with 8 outfits to copy.
Copy the codes or open a palette in the editor to tweak it.
Based on WCAG 2.1 guidelines. Test other pairs in the contrast checker.
:root {
--medium-gray: #808080;
--medium-gray-rgb: 128, 128, 128;
}
.bg { background-color: var(--medium-gray); }
.text { color: var(--medium-gray); }
The hex code for medium gray is #808080. In RGB it is rgb(128, 128, 128), in HSL hsl(0, 0%, 50%) and in CMYK 0, 0, 0, 50.
Its complement on the color wheel is #808080, close to gray. Used in small doses, it works as an accent and adds strong contrast.
Use black text instead: the contrast with white is only 3.9:1, while with black it is 5.3:1.
We use Google Analytics cookies to understand how the site is used. Is that OK? Learn more