Midnight Violet
Developer tools & tech communities (dark) · Score 80 ·Premium · Added 2026-10-12 · Updated 2026-10-29
The lead color is very pale, so treat it as a background and let a deeper color of the family carry the emphasis. On a web page it works when the brand color anchors calls to action and the surrounding roles stay quiet enough for long reading sessions.
Midnight Violet is a 10-role Web palette: primary #a78bfa on a #0f0d1a canvas. Body text reaches 16.19:1 (WCAG AAA), leaving enough headroom for long reading sessions; the primary sits at 7.06:1 against the canvas, so white text sits on it safely.
10 color roles
primary#a78bfargb(167, 139, 250)hsl(255.1, 91.7%, 76.3%)primaryHover#8b6ef0rgb(139, 110, 240)hsl(253.4, 81.3%, 68.6%)primaryActive#6d4fd8rgb(109, 79, 216)hsl(253.1, 63.7%, 57.8%)textMain#ede9fergb(237, 233, 254)hsl(251.4, 91.3%, 95.5%)textSub#a29bc4rgb(162, 155, 196)hsl(250.2, 25.8%, 68.8%)bg#0f0d1argb(15, 13, 26)hsl(249.2, 33.3%, 7.6%)surface#1a1729rgb(26, 23, 41)hsl(250, 28.1%, 12.5%)border#2e2947rgb(46, 41, 71)hsl(250, 26.8%, 22%)link#6837fbrgb(104, 55, 251)hsl(255, 96.1%, 60%)accent#22d3eergb(34, 211, 238)hsl(187.9, 85.7%, 53.3%)Editorial review · Web
Delta E 417, close to complementary. Crisp apart, but they fight when placed side by side at scale.
Measured 3.2:1, enough for large or bold text only. Do not put body copy on it.
Saturation 92%, near a pure color. Keep it to small accents.
Measured 10.6:1, AAA. Safe for body copy and small text.
How this palette is put together
Six readings computed from these exact color values. None of them would hold for another palette.
- Primary hue rangeThe primary lands at hue 255°, 92% saturation, in the violet range, which reads as creative with a hint of distance. Content, design and premium products suit it. Pale violets rarely clear contrast thresholds as a primary, so the fix is to deepen rather than brighten. 9 palettes share the range.
- Lightness distributionThe ten roles show a lightness standard deviation of 27.5 around a mean of 52%: layered without being theatrical. The background recedes, cards lift, text holds, and all of it survives a switch to grayscale.
- Background temperatureAt 33% saturation and hue 249°, #0F0D1A is a tinted ground rather than a gray one. It brings its own mood and fixes the key of the whole palette, so the primary can only be chosen inside that key. Dark text on it needs its contrast measured again instead of borrowing the usual neutral-background assumptions.
- Standing among peersAmong the 3 palettes tagged Cyber, this one measures 7.06:1 for primary on background, ranking 1. That puts it among the most legibility-forward in the group.
- Primary vs accent7.06:1 for the primary against 10.63:1 for the accent, 1.5× apart. Rank is established without being severe: the accent stands out without overtaking. Most interfaces are steadiest here, with two usable visual weights on offer.
- Text hierarchyText main reaches 16.19:1 on the background and secondary text 7.34:1, both clearing body-copy thresholds. Small type at 12px works as-is, with no need to enlarge it or darken the ink.
How to use it
The lead color sits at 76% lightness and 92% saturation. The lead color is very light and better suited to backgrounds and containers, so let a deeper color of its own carry the emphasis. Saturation runs high, so the color is energetic and hard to miss; keep it to buttons and key marks, because large fields of it get loud.
What it looks like in a real interface
Build your product with this palette
Navigation, buttons, cards and text hierarchy, previewed in one go.
Primary actionLearn moreAccessibility contrast check
| Foreground / background | Ratio | Body text | Large text |
|---|---|---|---|
| Body text / page background | 16.19:1 | AAA | AAA |
| Body text / card background | 14.76:1 | AAA | AAA |
| Brand color / page background | 7.06:1 | AAA | AAA |
Verify this pair in the checker →Compare with other palettes →Site-wide accessibility report →
More palettes on this platform
Where this one sits in the library
The numbers below come from measured color distances against the other 34 palettes on this platform (mean over ten roles). They would not hold in a different library.
- Even the nearest neighbor, Mulberry, sits at Delta E 359, so this one stands fairly alone here.
- Furthest from Cinnabar Ink at Delta E 459; put the two side by side and they pull in opposite directions.
- Primary saturation 92 percent, rank 1 of 34 on this platform, the loud end of the range.
Export to your project
Eight formats, ready to paste: four for the web, plus one each for Android, iOS, Flutter and mini programs. Or fetch them by URL from your tooling or AI agent.
:root {
--color-primary: #a78bfa; /* Primary */
--color-primaryHover: #8b6ef0; /* Primary hover */
--color-primaryActive: #6d4fd8; /* Primary active */
--color-textMain: #ede9fe; /* Text main */
--color-textSub: #a29bc4; /* Text sub */
--color-bg: #0f0d1a; /* Background */
--color-surface: #1a1729; /* Surface */
--color-border: #2e2947; /* Border */
--color-link: #6837fb; /* Link */
--color-accent: #22d3ee; /* Accent */
}