Gray — #808080

The hex code for gray is #808080 — rgb(128, 128, 128), hsl(0.0, 0.0%, 50%). Use it in CSS as color: #808080;.

Gray is a neutral between black and white. It is calm, balanced, and unobtrusive — the workhorse color for text, borders, and backgrounds.

Gray color codes — click to copy

HEX#808080
RGBrgb(128, 128, 128)
HSLhsl(0.0, 0.0%, 50%)
HSVhsv(0.0, 0%, 50%)
CMYKcmyk(0%, 0%, 0%, 50%)

Shades, tints & tones of gray

Click any swatch to copy it.

Shades — mix with black
Tints — mix with white
Tones — mix with gray

Gray harmonies

Click a swatch to copy it.

Complementary
Analogous
Triadic
Split Complementary
Tetradic
Square
Monochromatic

Colors that go with gray

ColorHex
White#FFFFFF
Yellow#FFFF00
Pink#FFC0CB
Teal#008080

Where gray is used

Use gray for body text (dark gray is softer than pure black), dividers, and secondary elements. Warm grays feel cozy; cool grays feel modern. Mid-gray text on white fails accessibility, so use dark gray for text.

What gray is often associated with: Neutrality, balance, calm, and professionalism.

Contrast — can you read text on gray?

White text on gray scores 3.95:1

Normal text: AA Fail   AAA Fail

Large text (18pt+, or 14pt bold+): AA Pass   AAA Fail

Black text scores 5.32:1

Normal text: AA Pass   AAA Fail

Large text (18pt+, or 14pt bold+): AA Pass   AAA Pass

Check any pair in the contrast checker →

How gray looks with color blindness

Simulated with the Machado matrices. Click a swatch to copy the simulated color.

Protanopia

#808080

Deuteranopia

#808080

Tritanopia

#808080

This is a simulation for design checks, not a vision test. See the color blind simulator for any palette.

Frequently asked questions

What is the hex code for gray?

The hex code for gray is #808080.

What is the RGB of gray?

The RGB of gray is rgb(128, 128, 128).

What colors go with gray?

Colors that go well with gray include white (#FFFFFF), yellow (#FFFF00), pink (#FFC0CB). See the pairings table on this page for the full list.

Is gray a good color for a website?

Gray works well as an accent or background — black text on it scores 5.32:1, which passes WCAG AA. Check any pair in the contrast checker before you ship it.

What does the color gray mean?

Neutrality, balance, calm, and professionalism.

Related tools

Color Picker · Color Names · Palette Generator · Complementary Colors · Contrast Checker