Hex Color #d9d9d9 — Complete Guide for Designers & Developers

#d9d9d9 — Light Silver / Gainsboro

RGB: rgb(217, 217, 217)

HSL: hsl(0, 0%, 85%)

OKLCH: oklch(87.5% 0 0)

Lightness: 85% · Saturation: 0%

Hex #d9d9d9 is a light gray color — one of the most widely used structural colors in web design, app development, and UI systems. It appears in Figma defaults, Google Slides, Material Design borders, and disabled state styling. But using it correctly requires understanding how it renders across devices, its accessibility limitations, and its role in a design system. This guide covers everything.

hex color #d9d9d9 light gray hex code hex to rgb converter gray color web design #d9d9d9 accessibility CSS gray color codes

🎨 Need to convert #d9d9d9 to RGB, HSL, CMYK or any other format? Use our free tool!

🔍 Open Free Hex to RGB Converter →

Hex · RGB · HSL · CMYK · OKLCH · Color Picker · 100% free

Why #d9d9d9 Looks Different on Every Screen

"It looks fine on my screen" is the least reliable statement a designer can make about #d9d9d9. Because it sits so close to white at Lightness 85%, it is highly sensitive to monitor calibration, color profiles, and ambient lighting. Here's exactly what happens across environments:

Environment / Display How #d9d9d9 Behaves Designer's Workaround
RGB vs. Display P3 Shifts slightly warmer/cooler. On modern MacBooks (P3), looks perceptually different than sRGB office monitors. Define grays using OKLCH color space instead of raw Hex/RGB for perceptual uniformity across wide-gamut displays.
Uncalibrated TN Panels Often washes out completely — indistinguishable from #ffffff. Card borders disappear entirely. Use structural shadows (box-shadow) alongside #d9d9d9 borders to ensure element separation.
macOS vs Windows Text macOS sub-pixel rendering keeps text sharp. Windows ClearType can make it fuzzy at small font sizes. Avoid #d9d9d9 as a text background below 14px/400w on cross-platform web apps.
Dark Mode Contexts Hardcoded #d9d9d9 becomes a glaring bright element that ruins dark mode ergonomics. Never hardcode the hex. Bind it to a CSS variable using color-scheme: light dark.
Print Output (CMYK) Converts to approximately 15% black (K). Prints as near-invisible on standard office printers. Bump @media print value to at least #bfbfbf (25% K) for visible print output.
💡 Quick fix: Never use raw #d9d9d9 in code — always assign it to a named CSS variable. This makes dark mode, print, and theme changes a single-line update.

🎨 Want to see how #d9d9d9 converts across color formats? Try our free converter!

🔍 Convert #d9d9d9 to Any Format →

The #d9d9d9 Accessibility Trap — When WCAG Pass Still Fails

Most color tools give #d9d9d9 a binary pass/fail. But passing WCAG is not the same as being accessible in practice — and #d9d9d9 sits precisely where this gap is most dangerous.

💡 Pure black (#000000) on #d9d9d9 achieves a contrast ratio of 7.12:1, passing WCAG AAA — yet it still causes problems for users with cataracts or low-contrast sensitivity because overall page luminance is high.

⚠️ The Gray-on-Gray Failure

Layering #d9d9d9 backgrounds with #9e9e9e or #bdbdbd text for "subtle" labels fails WCAG AA for normal text at any size. Under WCAG 3.0's APCA model — which accounts for font size and weight — #d9d9d9 backgrounds require stricter re-evaluation.

✅ Decision Tree — Can I Use #d9d9d9 Here?

📝 Is it a text background?

With pure black or dark gray (#333333) text → PASS
For body text, #ffffff or #fafafa outperforms it in readability.

📐 Is it a structural border or divider?

Separating critical layout zones → PASS (ensure 2px width or add a subtle shadow for TN panels)

🚫 Is it indicating a Disabled UI State?

With secondary visual indicator (slashed icon or cursor: not-allowed) → PASS
No secondary indicator → FAIL — color-blind users may not distinguish disabled from active.

🎨 Is it a decorative element?

Purely decorative → PASS — contrast rules do not apply to decorative elements.

#d9d9d9 and Color Blindness — What Designers Miss

Most color pages show color blindness simulations as decorative swatches. The practical design implications are rarely discussed. Here's what actually matters:

Color Blindness Type How #d9d9d9 Appears Design Risk
Protanopia (red-blind) Perceived as neutral cool gray — no significant shift Low for color itself. High if paired with red (#ff0000) for state indication.
Deuteranopia (green-blind) Similar to protanopia — neutral gray Low for color itself. High if green used alongside it for active vs. inactive states.
Tritanopia (blue-blind) Slight warm shift — may appear as pale beige Low. Minimal perceptual change.
Achromatopsia (no color vision) Medium-light gray — ~#767676 equivalent in grayscale Medium. #d9d9d9 and #e0e0e0 become nearly indistinguishable — border contrast collapses.
💡 Practical rule: #d9d9d9 is safe as a standalone neutral. It becomes a problem when it is the only differentiator between two states — active/inactive, enabled/disabled. Always pair it with a non-color indicator: shape, icon, label, or cursor change.

Why #d9d9d9 Is the Most Over-Used Color in Design Systems

Millions of mockups contain #d9d9d9 not because a designer chose it — but because nobody changed the default. It is Figma's default frame background gray and the default gray in Google Slides.

🚨 The Problem: Gray Drift

Teams assign #d9d9d9 as a base variable like neutral-300. Developers then use it for borders, backgrounds, disabled states, and dividers simultaneously. One hex ends up carrying four different meanings across the codebase.

✅ The Solution: Semantic Tokens

Material Design 3, Apple HIG, and Atlassian Design System use named semantic tokens rather than raw hex values.

❌ Before — The Raw Hex Trap

/* Changing one thing breaks everything else */ .card { border: 1px solid #d9d9d9; } .btn-disabled { background-color: #d9d9d9; } .page-wrap { background: #d9d9d9; }

✅ After — Semantic Variables

:root { --color-border-default: #d9d9d9; --color-bg-sunken: #d9d9d9; --color-action-disabled: #d9d9d9; } .card { border: 1px solid var(--color-border-default); } .btn-disabled { background: var(--color-action-disabled); }
💡 Pro Tip: Run a Figma audit using the Selection Colors panel. Find all raw #d9d9d9 usage and replace with semantic variables before dev handoff. Dark-mode overrides then become a single variable change.

📊 #d9d9d9 in the Tailwind Gray Scale

Tailwind Class Hex Value Relative to #d9d9d9
gray-100 #f3f4f6 Lighter — near-white
gray-200 #e5e7eb Lighter — just above #d9d9d9
gray-300 #d1d5db Closest match to #d9d9d9
gray-400 #9ca3af Darker — mid-gray territory
gray-500 #6b7280 Darker — medium gray

#d9d9d9 Myths Designers and Developers Still Repeat

❌ Myth: "#d9d9d9 is a safe neutral that works everywhere"

✅ Reality: It reads cool against warm-toned content and slightly warm against blue-dominant UI. Neutral is always relative to surrounding colors — there is no universally safe gray.

❌ Myth: "Gray backgrounds improve readability"

✅ Reality: #d9d9d9 reduces contrast versus white. For body text, #ffffff or #fafafa outperforms it in legibility on all calibrated displays.

❌ Myth: "Placeholder text at #d9d9d9 passes accessibility"

✅ Reality: Fails WCAG AA on a white background. WCAG 1.4.3 requires placeholder text to meet the same contrast threshold as regular text — and #d9d9d9 on white does not pass.

❌ Myth: "#d9d9d9 and #e0e0e0 are basically the same"

✅ Reality: On 1px borders they are indistinguishable. On large surfaces — full panels, cards, page backgrounds — the difference is clearly visible on calibrated displays.

❌ Myth: "Gray is always safe for dark mode"

✅ Reality: #d9d9d9 in dark mode causes visual glare. Dark mode requires an independent gray ramp, typically #2a2a2a–#3d3d3d for equivalent visual weight to #d9d9d9 in light mode.

Platform-Specific Color Codes for #d9d9d9

Developers working across web, iOS, and Android need the correct format for each platform. Copy these directly into your codebase:

🌐 Web / CSS
/* Hex */ color: #d9d9d9; /* RGB */ color: rgb(217, 217, 217); /* HSL */ color: hsl(0, 0%, 85%); /* OKLCH */ color: oklch(87.5% 0 0);
🍎 iOS — SwiftUI
Color(white: 0.851) // With full RGB Color( red: 0.851, green: 0.851, blue: 0.851 )
🍎 iOS — UIKit
UIColor( white: 0.851, alpha: 1.0 )
🤖 Android — Jetpack Compose
Color(0xFFD9D9D9) // Note: FF = fully opaque
🤖 Android — XML
<color name="light_silver"> #FFD9D9D9 </color>
⚛️ React Native
backgroundColor: '#d9d9d9' // or backgroundColor: 'rgb(217,217,217)'
🐦 Flutter / Dart
Color(0xFFD9D9D9) // or with RGBA Color.fromRGBO( 217, 217, 217, 1.0 )
🎨 CSS — Semantic Variable
:root { --color-border: #d9d9d9; --color-disabled: #d9d9d9; } /* Dark mode override */ @media (prefers-color-scheme: dark) { :root { --color-border: #3d3d3d; } }
💡 Android & Flutter note: Always prefix hex with FF for fully opaque — #FFD9D9D9, not #d9d9d9. Skipping the alpha prefix causes transparent or undefined color behavior.

🔧 Need to convert #d9d9d9 to another format instantly? Our free tool does it in one click!

🔍 Free Hex to RGB Converter →

Hex · RGB · HSL · CMYK · OKLCH · iOS · Android · React Native

Frequently Asked Questions — Hex #d9d9d9

❓ What color is hex #d9d9d9?
#d9d9d9 is a light silver-gray color with RGB values of (217, 217, 217) and HSL of hsl(0, 0%, 85%). It has zero saturation — a pure neutral gray at 85% lightness. It is often called "Light Silver" or "Gainsboro" in traditional web color palettes.
❓ What is #d9d9d9 in RGB?
rgb(217, 217, 217) — all three channels equal, making it a pure neutral gray with no color cast. In percentage form: rgb(85.1%, 85.1%, 85.1%).
❓ Is #d9d9d9 accessible for text backgrounds?
It depends on the text color. Black (#000000) on #d9d9d9 achieves 7.12:1 contrast — passing WCAG AAA. However, gray text on #d9d9d9 typically fails WCAG AA. Always test your specific text/background combination with a contrast checker.
❓ What is #d9d9d9 in CMYK?
Approximately CMYK(0, 0, 0, 15) — 15% black with no cyan, magenta, or yellow. Note: at this low percentage, it prints as near-invisible on standard office printers. For print, use #bfbfbf (25% K) or darker for better visibility.
❓ Why does #d9d9d9 look different on Mac vs Windows?
Mac displays use Display P3 wide-gamut color profile, which renders #d9d9d9 with slightly different perceived lightness than Windows sRGB monitors. Additionally, macOS sub-pixel font rendering makes text on #d9d9d9 appear sharper than on Windows with ClearType.
❓ How do I use #d9d9d9 in dark mode correctly?
Never hardcode #d9d9d9 in your CSS. Assign it to a CSS variable and override it in dark mode using @media (prefers-color-scheme: dark). In dark contexts, the equivalent visual weight falls around #2a2a2a–#3d3d3d — roughly 15–25% lightness rather than 85%.
❓ What is the closest Tailwind CSS color to #d9d9d9?
Tailwind's gray-300 (#d1d5db) is the closest match. #d9d9d9 sits between gray-200 (#e5e7eb) and gray-300 (#d1d5db) in the Tailwind default scale. Use gray-300 as your Tailwind equivalent.
❓ What is #d9d9d9 in Android or Flutter code?
In Android (Jetpack Compose and XML) and Flutter, use Color(0xFFD9D9D9). The FF prefix represents the alpha channel at full opacity. Omitting it results in transparent or undefined color behavior on both platforms.

🎨 Convert #d9d9d9 to any color format — RGB, HSL, CMYK, OKLCH and more!

🔍 Open Free Color Converter Tool →

No signup · Works in all browsers · Supports 10+ color formats · 100% free

Found this guide helpful? Give it a like! 👇