PreviewingGo to this paletteOpen in generator
Code
/* Violet Dusk — colorset.net */
:root {
--color-1: #2D0F3D;
--color-2: #4A1A5C;
--color-3: #66267A;
--color-4: #803399;
--color-5: #9940B8;
--color-bg: #FCF3FF;
--color-surface: #F3EAF7;
--color-border: #DCD0E0;
--color-text: #2D0F3D;
--color-muted: #73657D;
--color-primary: #9940B8;
--color-on-primary: #FFFFFF;
--color-accent: #4A1A5C;
--color-on-accent: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #140B1A;
--color-surface: #1F1525;
--color-border: #34283C;
--color-text: #B29CBB;
--color-muted: #8D7C94;
--color-primary: #9940B8;
--color-on-primary: #FFFFFF;
--color-accent: #7A5A8E;
--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 #9940B8 | adjusted for contrast · from #2D0F3D |
| Surface | derived | derived |
| Border | derived | derived |
| Text | from palette · color 1 | adjusted for contrast · from #9940B8 |
| Muted text | derived | derived |
| Primary | from palette · color 5 | from palette · color 5 |
| On primary | derived | derived |
| Accent | from palette · color 2 | adjusted for contrast · from #803399 |
| On accent | derived | derived |
Contrast
| Pair | Sample | Ratio | WCAG |
|---|---|---|---|
| Text on background | 15.56:1 | AAA pass 4.5:1 | |
| Text on surface | 14.37:1 | AAA pass 4.5:1 | |
| Muted text on background | 4.99:1 | AA pass 4.5:1 | |
| Label on primary | 5.56:1 | AA pass 4.5:1 | |
| Label on accent | 13.18:1 | AAA pass 4.5:1 | |
| Primary on background | 5.13:1 | AA pass 3:1 | |
| Accent on background | 12.18:1 | AAA pass 3:1 |
| Pair | Sample | Ratio | WCAG |
|---|---|---|---|
| Text on background | 7.66:1 | AAA pass 4.5:1 | |
| Text on surface | 7.02:1 | AAA pass 4.5:1 | |
| Muted text on background | 4.98:1 | AA pass 4.5:1 | |
| Label on primary | 5.56:1 | AA pass 4.5:1 | |
| Label on accent | 5.71:1 | AA pass 4.5:1 | |
| Primary on background | 3.46:1 | AA Large pass 3:1 | |
| Accent on background | 3.37: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 | #2D0F3D (Text 1) | #4A1A5C (Text 2) | #66267A (Text 3) | #803399 (Text 4) | #9940B8 (Text 5) |
|---|---|---|---|---|---|
| #2D0F3D | Same color | 1.28— | 1.70— | 2.29— | 3.03AA Large |
| #4A1A5C | 1.28— | Same color | 1.33— | 1.79— | 2.37— |
| #66267A | 1.70— | 1.33— | Same color | 1.34— | 1.78— |
| #803399 | 2.29— | 1.79— | 1.34— | Same color | 1.33— |
| #9940B8 | 3.03AA Large | 2.37— | 1.78— | 1.33— | Same color |
Shades
Shades and tints (50–950)
