Skip to content
Kolorvia

Midnight UI

A ready-made dark-mode starter: three slate surfaces, one violet accent, one near-white text tone. The surface steps are close enough to layer cards without hard borders.

Colors

Export color codes



                    
                
Background #020618
Surface #1d293d
Border #45556c
Accent #8e51ff
Text #f8fafc

Accessibility snapshot

Each color's WCAG contrast ratio against white and black text — AA means it can carry normal-size text (≥4.5:1) on that background. Test your exact pairings in the contrast checker.

#020618 White text: 20.16:1 AA Black text: 1.04:1
#1d293d White text: 14.62:1 AA Black text: 1.44:1
#45556c White text: 7.58:1 AA Black text: 2.77:1
#8e51ff White text: 4.4:1 Black text: 4.77:1 AA
#f8fafc White text: 1.05:1 Black text: 20.07:1 AA

Color blindness safety

Every pair in this palette (10 pairs) checked with CIEDE2000 under normal vision plus the four strongest color vision deficiency types. A pair is flagged when it drops below ΔE 10 — the zone where colors get hard to tell apart at a glance.

#020618 vs #1d293d Achromatopsia ΔE 9.1 Hard to distinguish
#020618 vs #1d293d Protanopia ΔE 9.6 Hard to distinguish
#020618 vs #1d293d Deuteranopia ΔE 9.7 Hard to distinguish
#020618 vs #1d293d Normal vision ΔE 9.8 Hard to distinguish

Swatches show the pair as that viewer would see it. Flagged pairs are fine decoratively — just don’t make them the only difference between two states. Explore any pair in the simulator.

In a real interface

Roles assigned by lightness: the lightest color as background, the darkest as text, the first two palette colors as primary and accent.

Midnight UI

This is how the palette reads when its colors take on interface roles.

Primary action Secondary Badge

CSS variables

CSS
--color-1: #020618;
--color-2: #1d293d;
--color-3: #45556c;
--color-4: #8e51ff;
--color-5: #f8fafc;

Related tools

Make this palette your own

Turn it into a gradient with one click, or start fresh from any of its colors.

We use cookies for site preferences and, where enabled, Google Analytics and Google AdSense — which may use cookies to personalize ads based on your visits here and elsewhere. See our Privacy Policy for details. Your color tool inputs are never sent to us regardless of your choice.