Gray Color (#808080)
Gray is a CSS named color defined as hex code #808080. CSS gray is #808080: red, green and blue all at half strength, a perfectly neutral mid-tone with no color cast. The spelling grey is equally valid in CSS.
Color Overview & Formats
grayLuminance: 0.2159| Format | Syntax / Values | Notes | Action |
|---|---|---|---|
| HEX | #808080 | 6-digit hex web code | |
| RGB | rgb(128, 128, 128) | Red, Green, Blue channels (0-255) | |
| HSL | hsl(0, 0%, 50%) | Hue (0°), Saturation (0%), Lightness (50%) | |
| HSV / HSB | hsv(0, 0%, 50%) | Hue, Saturation (0%), Value/Brightness (50%) | |
| CMYK | cmyk(0%, 0%, 0%, 50%) | Digital mathematical approximation (non-print) | |
| OKLCH | oklch(0.600 0.000 0.0) | Perceptually uniform color space (CSS Color 4 approximation) |
background-color: #808080; /* or gray */- Select color format: Choose the desired format (HEX #808080, RGB, or HSL).
- Copy the code: Click the copy button or press Tab+Enter to store in clipboard.
- Pair with black text: Black text on Gray reaches 5.32:1 (WCAG AA).
What Colors Go With Gray?
These 6 colors all go well with Gray (#808080), and each one is a standard CSS named color. The ratio is the WCAG 2.2 contrast of that color on Gray: at 4.5:1 or above it works for text; below that, use it for backgrounds and accents.
Harmonious Palettes & Tints
The palettes below are algorithmically generated across standard intervals based on Gray (HSL 0°). Each group offers full palette copy and live preview:
Complementary Harmony
Hue rotated 180 degrees on the HSL wheel (0° to 180°), keeping the original saturation and lightness.
Analogous Harmony
Hues 30 degrees either side (330° and 30°), keeping the original saturation and lightness.
Triadic Harmony
Hues spaced evenly by 120 degrees (120° and 240°), keeping the original saturation and lightness.
Tints & Shades
Mixed with white (tints) and black (shades) in sRGB at 60% and 30%.
WCAG 2.2 Text Readability & Contrast Check
Under WCAG 2.2 criteria, regular body text requires at least 4.5:1 (AA) and large text requires at least 3.0:1. The table below displays calculated contrast ratios:
| Foreground Color | Contrast Ratio | Normal Text (AA) | Large Text (AA) | Normal Text AAA (>= 7.0:1) |
|---|---|---|---|---|
Pure Black (#000000) | 5.32:1 | Pass | Pass | Fail |
Pure White (#FFFFFF) | 3.95:1 | Fail | Pass | Fail |
Dark Charcoal (#212529) | 3.91:1 | Fail | Pass | Fail |
Mid Gray (#666666) | 1.45:1 | Fail | Fail | Fail |
Interactive Contrast Tester
Enter text foreground and background colors to verify WCAG legibility:
This is sample body text rendered directly to verify contrast and readability.
Gray Background Download
Download standard 1920x1080 solid desktop wallpaper or generate mobile wallpaper:
Standard Wallpaper: 1920x1080 PNG (#808080)Download Options
All wallpaper files precisely match the W3C standard color value:
CSS Standard & Usage Notes
gray = #808080 (rgb(128, 128, 128))
UI Design & Accessibility Guidelines
Use it for icons, borders, disabled states and neutral backgrounds. On Gray, black text passes WCAG AA at every size (5.32:1); white text passes only for large text (3.95:1).
Frequently Asked Questions (FAQ)
Can I use black text on Gray?
Yes. Black text on Gray has a WCAG 2.2 contrast ratio of 5.32:1, which passes AA (4.5:1) for all text sizes but not the stricter AAA level (7:1) for body text.
Can I use white text on Gray?
Only for large text. White text on Gray has a WCAG 2.2 contrast ratio of 3.95:1: enough for large text (3:1) but below the 4.5:1 needed for body text.
What colors go with Gray?
Black, White, Navy, Ivory, Gold and Sky Blue all go well with Gray. Black (5.32:1) has enough contrast for text on Gray; White, Navy, Ivory, Gold and Sky Blue work better as a background or accent.
What is the hex code for gray, and is it gray or grey?
The CSS named color gray is #808080, which is RGB(128, 128, 128). The spelling grey is also valid in CSS and gives exactly the same color.