Shades of Gray
with Hex Codes
Gray hex code: #808080 (CSS gray / grey) · Light gray: #D3D3D3 · Dim gray: #696969 · Silver: #C0C0C0
Grays do most of the quiet work in an interface: text, borders, backgrounds, disabled states and dividers. The CSS keyword gray (or grey, both spellings work) is #808080, exactly halfway between black and white. Neutral grays have equal red, green and blue values, while cool grays like slate lean blue and warm grays like taupe lean brown, which changes how a whole palette feels.
Complete List of Gray Color Shades
Shades of Gray — Hex Reference Table
Click any hex code or colour swatch to copy it to your clipboard.
| Preview | Name | Hex Code | RGB | Category |
|---|
How to Use Shades of Gray in CSS
Every shade on this page can be used directly in CSS. Copy the hex code and paste it into any CSS color property: color, background-color, border-color, box-shadow, or outline-color.
For transparency effects, convert the hex to RGB using the table above and use rgba(). For a design system, store your chosen shade as a CSS custom property so you can update it site-wide from one place.
Frequently Asked Questions
What is the hex code for gray?
gray (also spelled grey) is #808080 (RGB 128, 128, 128). Light gray is #D3D3D3, silver is #C0C0C0 and dim gray is #696969.Why is CSS darkgray lighter than gray?
darkgray (#A9A9A9) comes from the old X11 color list, while gray (#808080) comes from the HTML 4 list, so darkgray ends up lighter. Use dimgray (#696969) or a hex code when you need a darker gray.What is the hex code for charcoal gray?
#36454F (RGB 54, 69, 79), a dark gray with a slight blue tint. Other dark grays are gunmetal #2A3439, jet #343434, onyx #353839 and Davy's gray #555555.What are the different shades of gray called?
How do I use gray in CSS?
color: #6B7280;, a keyword like color: dimgray;, or RGB for transparency: background: rgba(128, 128, 128, 0.3);. Both gray and grey spellings are valid in every gray keyword, for example lightgrey.