PreviewingGo to this paletteOpen in generator
Code
/* Midnight Violet — colorset.net */
:root {
--color-1: #191970;
--color-2: #2F2F4F;
--color-3: #4B0082;
--color-4: #663399;
--color-5: #8A2BE2;
--color-bg: #F8F5FF;
--color-surface: #F0EBF9;
--color-border: #D7D1E3;
--color-text: #1D2557;
--color-muted: #636A83;
--color-primary: #8A2BE2;
--color-on-primary: #FFFFFF;
--color-accent: #191970;
--color-on-accent: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0A0E1F;
--color-surface: #14182A;
--color-border: #272C42;
--color-text: #AB9FC1;
--color-muted: #877E98;
--color-primary: #8D30E5;
--color-on-primary: #FFFFFF;
--color-accent: #4E5FBA;
--color-on-accent: #FFFFFF;
}
}
Color values
| Color | HEX | RGB | HSL | OKLCH |
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 |
Roles & contrast
Original colors are kept; roles are adjusted only when needed for contrast.
| Role | Light mode | Dark mode |
|---|---|---|
| Background | adjusted for contrast · from #8A2BE2 | adjusted for contrast · from #2F2F4F |
| Surface | derived | derived |
| Border | derived | derived |
| Text | adjusted for contrast · from #2F2F4F | adjusted for contrast · from #8A2BE2 |
| Muted text | derived | derived |
| Primary | from palette · color 5 | adjusted for contrast · from #8A2BE2 |
| On primary | derived | derived |
| Accent | from palette · color 1 | adjusted for contrast · from #663399 |
| On accent | derived | derived |
Contrast
| Pair | Sample | Ratio | WCAG |
|---|---|---|---|
| Text on background | 13.40:1 | AAA pass 4.5:1 | |
| Text on surface | 12.35:1 | AAA pass 4.5:1 | |
| Muted text on background | 4.97:1 | AA pass 4.5:1 | |
| Label on primary | 5.96:1 | AA pass 4.5:1 | |
| Label on accent | 14.85:1 | AAA pass 4.5:1 | |
| Primary on background | 5.53:1 | AA pass 3:1 | |
| Accent on background | 13.78:1 | AAA pass 3:1 |
| Pair | Sample | Ratio | WCAG |
|---|---|---|---|
| Text on background | 7.72:1 | AAA pass 4.5:1 | |
| Text on surface | 7.09:1 | AAA pass 4.5:1 | |
| Muted text on background | 4.99:1 | AA pass 4.5:1 | |
| Label on primary | 5.70:1 | AA pass 4.5:1 | |
| Label on accent | 5.72:1 | AA pass 4.5:1 | |
| Primary on background | 3.37:1 | AA Large pass 3:1 | |
| Accent on background | 3.35:1 | AA Large pass 3:1 |
Every color on every color
Rows are backgrounds and columns are text colors, using the actual palette colors. Ratios: AAA 7:1, AA 4.5:1, AA large text 3:1.
| Background / Text | #191970 (Text 1) | #2F2F4F (Text 2) | #4B0082 (Text 3) | #663399 (Text 4) | #8A2BE2 (Text 5) |
|---|---|---|---|---|---|
| #191970 | Same color | 1.16— | 1.15— | 1.77— | 2.49— |
| #2F2F4F | 1.16— | Same color | 1.01— | 1.52— | 2.15— |
| #4B0082 | 1.15— | 1.01— | Same color | 1.54— | 2.17— |
| #663399 | 1.77— | 1.52— | 1.54— | Same color | 1.41— |
| #8A2BE2 | 2.49— | 2.15— | 2.17— | 1.41— | Same color |
Shades
Shades and tints (50–950)
