Midnight Interface

A refined dark mode palette inspired by modern code editors and developer tools. Midnight Interface balances deep blue-tinted backgrounds with crisp text and vivid accent colors for clear visual hierarchy.

dark-modedevelopercode-editorui-designblue-tintedhigh-contrast
#0D1117
#161B22
#21262D
#8B949E
#C9D1D9
#58A6FF
#3FB950
#F97316

Hover to expand · Click any color to copy

Background— Primary background for the application shell and main content areas
Surface— Card backgrounds, sidebars, and secondary content surfaces
Elevated— Elevated components like dropdowns, modals, and tooltips
Muted Text— Secondary text, placeholders, and less prominent labels
Primary Text— Primary body text and headings for maximum readability
Accent Blue— Links, interactive elements, and primary call-to-action highlights
Success Green— Success states, positive indicators, and confirmation messages
Warning Orange— Warning states, cautionary messages, and attention-drawing elements

Building a Dark Mode UI with This Palette

Midnight Interface provides a layered approach to dark mode design that mirrors the depth systems used by GitHub, VS Code, and other developer-focused interfaces. Start with #0D1117 as your base background for the application shell, then use #161B22 for cards, sidebars, and panels that need to visually separate from the main canvas. The #21262D elevated shade works perfectly for dropdowns, modal overlays, and tooltip backgrounds where you need a clear but subtle distinction from the surface below. For text, rely on #C9D1D9 for primary body content and headings, reserving #8B949E for secondary information like timestamps, captions, and placeholder text. The three accent colors serve distinct functional purposes: blue for interactive elements and links, green for success and positive feedback, and orange for warnings and attention states.

Why These Specific Colors?

The blue-tinted dark backgrounds in this palette reduce eye strain during extended use compared to pure black or warm-tinted alternatives. Each background shade uses the same 215-degree hue angle, creating visual cohesion across the layered surfaces while maintaining enough lightness separation (7%, 11%, 15%) for clear depth perception. The primary text color at 82% lightness avoids the harshness of pure white (#FFFFFF) on dark backgrounds, which can cause halation and visual fatigue. The accent blue at 212 degrees aligns with the background hue family, making it feel integrated rather than jarring. Green and orange were chosen at high saturation levels to ensure they remain vivid and distinguishable against the desaturated background tones.

Accessibility Notes

This palette is engineered for strong WCAG compliance. Primary text (#C9D1D9) achieves a 12.26:1 contrast ratio against the base background, well exceeding the AAA requirement of 7:1. Both the accent blue (7.49:1) and success green (7.45:1) also pass AAA when used on the primary background, making them safe choices for links and status indicators at normal text sizes. Muted text (#8B949E) reaches 6.15:1, passing AA but falling short of AAA, so it should be reserved for larger text or supplementary labels where WCAG AA compliance is sufficient. When using the warning orange (6.75:1), keep it at body text sizes or larger for AA compliance. Avoid placing any accent color directly on the elevated surface (#21262D) without verifying the reduced contrast ratio still meets your target compliance level.

Tailwind CSS Integration

This palette maps closely to Tailwind's default gray and color scales, making implementation straightforward. Use bg-gray-950 for the app background, bg-gray-900 for surface cards, and bg-gray-800 for elevated elements. Text colors map to text-gray-200 for primary content and text-gray-400 for muted labels. Accent colors use text-blue-400, text-green-500, and text-orange-500 respectively. For a more precise match, extend your tailwind.config.js with custom color values using the exact hex codes. Consider creating semantic color aliases like 'surface', 'elevated', and 'muted' in your Tailwind config to make the design system more maintainable and to decouple your component styles from specific color values.