Shades of Gray: 40 Gray and Grey Color Codes (HEX, RGB, HSL)

Every shade of gray (or grey), from silver and light gray to slate and charcoal, with HEX, RGB, HSL and OKLCH codes, plus gray color palettes for UI design. Click to copy.

40 shades ยท click any value to copy

Light grays

  • White Smoke

    RGB
    HSL
    OKLCH
  • Anti-Flash White

    RGB
    HSL
    OKLCH
  • Platinum

    RGB
    HSL
    OKLCH
  • Gainsboro

    RGB
    HSL
    OKLCH
  • Timberwolf

    RGB
    HSL
    OKLCH
  • Light Gray

    RGB
    HSL
    OKLCH
  • Pale Silver

    RGB
    HSL
    OKLCH
  • Silver

    RGB
    HSL
    OKLCH

Medium grays

  • Gray (X11)

    RGB
    HSL
    OKLCH
  • Dark Gray

    RGB
    HSL
    OKLCH
  • Spanish Gray

    RGB
    HSL
    OKLCH
  • Battleship Gray

    RGB
    HSL
    OKLCH
  • Gray

    RGB
    HSL
    OKLCH
  • Sonic Silver

    RGB
    HSL
    OKLCH
  • Dim Gray

    RGB
    HSL
    OKLCH
  • Cool Gray

    RGB
    HSL
    OKLCH

Cool grays

  • Ash Gray

    RGB
    HSL
    OKLCH
  • Silver Chalice

    RGB
    HSL
    OKLCH
  • Cadet Gray

    RGB
    HSL
    OKLCH
  • Manatee

    RGB
    HSL
    OKLCH
  • Roman Silver

    RGB
    HSL
    OKLCH
  • Light Slate Gray

    RGB
    HSL
    OKLCH
  • Steel Gray

    RGB
    HSL
    OKLCH
  • Slate Gray

    RGB
    HSL
    OKLCH

Warm grays

  • Greige

    RGB
    HSL
    OKLCH
  • Grullo

    RGB
    HSL
    OKLCH
  • Cinereous

    RGB
    HSL
    OKLCH
  • Stone

    RGB
    HSL
    OKLCH
  • Taupe Gray

    RGB
    HSL
    OKLCH
  • Rocket Metallic

    RGB
    HSL
    OKLCH
  • Warm Gray

    RGB
    HSL
    OKLCH
  • Dove Gray

    RGB
    HSL
    OKLCH

Dark grays

  • Davy's Gray

    RGB
    HSL
    OKLCH
  • Outer Space

    RGB
    HSL
    OKLCH
  • Arsenic

    RGB
    HSL
    OKLCH
  • Charcoal

    RGB
    HSL
    OKLCH
  • Onyx

    RGB
    HSL
    OKLCH
  • Jet

    RGB
    HSL
    OKLCH
  • Dark Slate Gray

    RGB
    HSL
    OKLCH
  • Gunmetal

    RGB
    HSL
    OKLCH

Gray color palettes

  • Neutral UI
  • Slate
  • Warm Gray
  • Charcoal and Mustard
  • Concrete
  • Gray and Blush

Gray or grey?

Both are correct. Gray is the usual American spelling and grey the British one. CSS accepts both in color names (gray and grey, darkgray and darkgrey), and they produce the same color.

Grays in UI design

Almost every interface is built on a scale of grays: backgrounds, borders, disabled states and secondary text. Pure neutral grays can look flat, so many design systems tint them slightly: cool grays (with a hint of blue, like slate) feel crisp and techy, warm grays (with a hint of brown) feel friendlier. Pick one family and use it everywhere.

Using gray in CSS

Light gray text is the most common accessibility failure on the web. On a white background, #767676 is the lightest gray that passes the 4.5:1 contrast needed for normal text (4.54:1). Anything lighter, like #999999 or silver, is fine for borders and decorations but not for text.

css
:root {
  --gray-50:  #F5F5F5;
  --gray-200: #E0E0E0;
  --gray-500: #767676; /* lightest gray for text on white */
  --gray-900: #212121;
}

body { color: var(--gray-900); }
.muted { color: var(--gray-500); }
hr { border-color: var(--gray-200); }

FAQ

What is the hex code for gray?
The CSS color gray (or grey) is #808080, exactly halfway between black and white in each channel.

What is the hex code for light gray?
The CSS color lightgray is #D3D3D3. For a lighter background gray, use whitesmoke (#F5F5F5).

What is the hex code for charcoal?
Charcoal is #36454F, a dark gray with a blue tint.

Why is darkgray lighter than gray in CSS?
A historical quirk: darkgray (#A9A9A9) comes from the old X11 color list, while gray (#808080) comes from HTML. The two lists were merged without fixing the names.

What colors go with gray?
Gray works with everything, which is why it’s used as a base. For accents, try mustard yellow, blush pink, or a bright blue; see the shades of yellow and shades of pink.

More colors

Need a gradient from these colors? Use the CSS gradient generator.

Did you find this useful? Share it with your friends: