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.

View JSON

10 color roles

Primary primary
Brand color, mapped to the CSS variable --color-primary
#a78bfargb(167, 139, 250)hsl(255.1, 91.7%, 76.3%)
Primary hover primaryHover
Hover state: --color-primary-hover
#8b6ef0rgb(139, 110, 240)hsl(253.4, 81.3%, 68.6%)
Primary active primaryActive
Pressed state: --color-primary-active
#6d4fd8rgb(109, 79, 216)hsl(253.1, 63.7%, 57.8%)
Text main textMain
Body text: --color-text-main
#ede9fergb(237, 233, 254)hsl(251.4, 91.3%, 95.5%)
Text sub textSub
Secondary text: --color-text-sub
#a29bc4rgb(162, 155, 196)hsl(250.2, 25.8%, 68.8%)
Background bg
Page background: --color-bg
#0f0d1argb(15, 13, 26)hsl(249.2, 33.3%, 7.6%)
Surface surface
Card and panel background: --color-surface
#1a1729rgb(26, 23, 41)hsl(250, 28.1%, 12.5%)
Border border
Dividers and outlines: --color-border
#2e2947rgb(46, 41, 71)hsl(250, 26.8%, 22%)
Link link
Link color: --color-link
#6837fbrgb(104, 55, 251)hsl(255, 96.1%, 60%)
Accent accent
Highlight color: --color-accent
#22d3eergb(34, 211, 238)hsl(187.9, 85.7%, 53.3%)

Editorial review · Web

Link color distance from body textSolid

Delta E 417, close to complementary. Crisp apart, but they fight when placed side by side at scale.

Link color legibility on the backgroundWatch

Measured 3.2:1, enough for large or bold text only. Do not put body copy on it.

How loud the primary is (saturation)Watch

Saturation 92%, near a pure color. Keep it to small accents.

Accent color legibility on the backgroundSolid

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.

Good forFor creative, beauty, content and membership products: the more emotional end of the spectrum. The lead color measures 7.06:1 against this background, past the AAA line, so it can carry emphasis inside body text without being darkened.
Use with careHighly saturated purple quickly looks gaudy, so be careful in B2B and utility products. Do not demote it to a background in a dark theme: over a near-black surface the lead color still measures 6.94:1, which keeps it reading as emphasis.
Pairs withA hint of gold reinforces the sense of quality. The accent measures 10.63:1 against this background, so it can carry text and icons directly.

Hue family: Purple

What it looks like in a real interface

Live preview · switch platform
your-site.com×+
https://your-site.com
New

Build your product with this palette

Navigation, buttons, cards and text hierarchy, previewed in one go.

Primary actionLearn more
Card oneSecondary copy, used to check contrast against WCAG.
Card twoAccent color for highlights: keep it a step away from the brand color.
Card threeNeutral text carries body copy, the most frequently used color.

Accessibility contrast check

Foreground / backgroundRatioBody textLarge text
Body text / page background16.19:1AAAAAA
Body text / card background14.76:1AAAAAA
Brand color / page background7.06:1AAAAAA

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 */ }