Color Converter (HEX, RGB, HSL)Specialized Version
🎨

Gray HEX Code

Gray color HEX code

RGB
H (0-360)S (%)L (%)

Copy CSS Values

Lightness Variations

Gray HEX Code

The HEX code for gray is #808080. Gray is created when red, green, and blue values are equal, producing a neutral tone. Gray is essential in UI design for backgrounds, borders, text, and creating visual hierarchy without distraction.

Gray Color Values

FormatValue
HEX#808080
RGBrgb(128, 128, 128)
HSLhsl(0, 0%, 50%)
CMYKC:0 M:0 Y:0 K:50

Gray Scale Variations

ShadeHEXRGBDescription
White Smoke#F5F5F5245Very light
Gainsboro#DCDCDC220Light gray
Light Gray#D3D3D3211Soft gray
Silver#C0C0C0192Medium light
Dark Gray#A9A9A9169Medium dark
Gray#808080128True middle
Dim Gray#696969105Dark
Charcoal#36454F-Very dark

Gray in UI Design

Gray is the workhorse of interface design:

``css :root { /* Text grays */ --text-primary: #1F2937; --text-secondary: #6B7280; --text-muted: #9CA3AF;

/* Background grays */ --bg-light: #F9FAFB; --bg-muted: #F3F4F6;

/* Border grays */ --border-light: #E5E7EB; --border-default: #D1D5DB; } `

Tailwind Gray Scale

LevelHEXUse Case
50#F9FAFBSubtle backgrounds
100#F3F4F6Page backgrounds
200#E5E7EBBorders, dividers
300#D1D5DBDisabled text
400#9CA3AFPlaceholder text
500#6B7280Secondary text
600#4B5563Icons
700#374151Primary text
800#1F2937Headings
900#111827Near black

Warm vs Cool Grays

TypeUndertoneHEX ExampleUse
Warm GrayRed/yellow#78716CCozy, natural
Cool GrayBlue#6B7280Modern, tech
True GrayNone#808080Neutral

Gray Spelling: Gray vs Grey

Both spellings are correct:

  • Gray: American English
  • Grey: British English
In CSS, use "gray" for keywords (e.g., gray, darkgray`).

Gray Accessibility

Text ColorBackgroundContrastWCAG
#6B7280#FFFFFF5.0:1AA
#4B5563#FFFFFF7.5:1AAA
#9CA3AF#FFFFFF3.0:1AA Large
Use darker grays (#4B5563 or darker) for body text on white backgrounds.

Frequently Asked Questions

What is gray in HEX?

#808080 is medium gray, the exact midpoint between black and white.

Gray vs grey spelling?

Gray is American English, grey is British English. Both are correct; CSS uses "gray".

What gray is best for text?

For body text on white, use #374151 to #1F2937 for good readability and WCAG compliance.

Related Tools

Explore other tools you might find useful:

Related Calculators