Gray colour (#808080)
Gray is medium a neutral grey with hex code #808080, one of the 148 named colours every browser understands, so you can write color: ${name} directly in CSS. In RGB it is 128, 128, 128; in HSL 0°, 0%, 50%. Use the tool to explore shades and harmonies.
How to use the Gray colour
- The colour is pre-filled; click Explore to see all formats, shades and harmonies.
- Edit the value to try a variation.
- Copy the code you need.
Gray in every format
| Format | Value |
|---|---|
| HEX | #808080 |
| RGB | rgb(128, 128, 128) |
| RGB (0–1) | 0.502, 0.502, 0.502 |
| HSL | hsl(0, 0%, 50%) |
| CMYK (approx.) | 0%, 0%, 0%, 50% |
| CSS | color: gray; |
Shades and tints of Gray
Same hue and saturation, lightness from 90% to 10%:
#e6e6e6 | #cccccc | #b3b3b3 | #999999 | #808080 | #666666 | #4d4d4d | #333333 | #1a1a1a |
Colours that go with Gray
| Harmony | Colours | |
|---|---|---|
| Complementary | #808080 | |
| Triadic | #808080 | #808080 |
| Analogous | #808080 | #808080 |
Similar named colours
The closest CSS named colours by RGB distance, useful when you need a keyword instead of a hex code or want a near match:
| Colour | HEX | Difference |
|---|---|---|
| slategray | #708090 | very close |
| lightslategray | #778899 | very close |
| dimgray | #696969 | close |
| cadetblue | #5f9ea0 | close |
| darkseagreen | #8fbc8f | close |
Accessibility
Contrast ratio of Gray against white is 3.95:1 (fails WCAG AA for normal text) and against black 5.32:1 (passes). Use black or very dark text on a Gray background rather than white.
Frequently asked questions
What is the hex code for Gray?
#808080.
What is Gray in RGB?
rgb(128, 128, 128).
What colour is complementary to Gray?
#808080, directly opposite on the colour wheel.
Privacy
This tool runs entirely inside your browser using WebAssembly and the Canvas/File APIs. Your files are never uploaded to ToolFlint or any third party; you can verify this in your browser's network tab or by switching to airplane mode after the page loads. Read how we process files.
Last updated 2026-09-23.