10 colour roles
Every colour has a defined purpose. Use the buttons on the right to copy it in any format.
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%)How to use it
Written by hand for the hue family and lightness of this palette, not assembled from a template.
The lead colour is very light and better suited to backgrounds and containers — give emphasis to a deeper colour of its own.
What it looks like in a real interface
The same palette rendered across all three platforms — the fastest way to judge whether it works.
Build your product with this palette
Navigation, buttons, cards and text hierarchy — previewed in one go.
Primary actionLearn moreAccessibility contrast check
Calculated to WCAG 2.1. AA is the accessibility baseline, AAA the enhanced level.
| 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 colour / page background | 7.06:1 | AAA | AAA |
Export to your project
Four formats, ready to paste. Or fetch them by URL from your tooling or AI agent.
CSS variables
: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 */
}SCSS variables
$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; // AccentTailwind config
// tailwind.config.js: Midnight Violet
module.exports = {
theme: {
extend: {
colors: {
'primary': '#a78bfa',
'primaryHover': '#8b6ef0',
'primaryActive': '#6d4fd8',
'textMain': '#ede9fe',
'textSub': '#a29bc4',
'bg': '#0f0d1a',
'surface': '#1a1729',
'border': '#2e2947',
'link': '#6837fb',
'accent': '#22d3ee',
},
},
},
};Machine-readable JSON
{
"name": "Midnight Violet",
"platform": "web",
"tags": [
"Dark",
"Tech",
"Cyber"
],
"advice": {
"family": "Purple",
"depth": "The lead colour is very light and better suited to backgrounds and containers — give emphasis to a deeper colour of its own.",
"muted": null,
"suit": "For creative, beauty, content and membership products — the more emotional end of the spectrum.",
"avoid": "Highly saturated purple quickly looks gaudy, so be careful in B2B and utility products.",
"pair": "A hint of gold reinforces the sense of quality."
},
"roles": {
"primary": "#a78bfa",
"primaryHover": "#8b6ef0",
"primaryActive": "#6d4fd8",
"textMain": "#ede9fe",
"textSub": "#a29bc4",
"bg": "#0f0d1a",
"surface": "#1a1729",
"border": "#2e2947",
"link": "#6837fb",
"accent": "#22d3ee"
},
"contrast": {
"textOnBg": {
"ratio": 16.19,
"level": "AAA"
},
"primaryOnBg": {
"ratio": 7.06,
"level": "AAA"
},
"textOnSurface": {
"ratio": 14.76,
"level": "AAA"
}
}
}