PreviewingGo to this paletteOpen in generator
Code
/* Midnight Library — colorset.net */
:root {
--color-1: #04070F;
--color-2: #0D1321;
--color-3: #1B273A;
--color-4: #9F7932;
--color-5: #D4C9B5;
--color-bg: #FAF6F0;
--color-surface: #F0EDE7;
--color-border: #D9D4CB;
--color-text: #04070F;
--color-muted: #595F6B;
--color-primary: #967028;
--color-on-primary: #FFFFFF;
--color-accent: #0D1321;
--color-on-accent: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #04070F;
--color-surface: #0C1019;
--color-border: #1D2430;
--color-text: #D4C9B5;
--color-muted: #867C6A;
--color-primary: #967028;
--color-on-primary: #FFFFFF;
--color-accent: #5A606C;
--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 #D4C9B5 | from palette · color 1 |
| Surface | derived | derived |
| Border | derived | derived |
| Text | from palette · color 1 | from palette · color 5 |
| Muted text | derived | derived |
| Primary | adjusted for contrast · from #9F7932 | adjusted for contrast · from #9F7932 |
| On primary | derived | derived |
| Accent | from palette · color 2 | adjusted for contrast · from #9F7932 |
| On accent | derived | derived |
Contrast
| Pair | Sample | Ratio | WCAG |
|---|---|---|---|
| Text on background | 18.71:1 | AAA pass 4.5:1 | |
| Text on surface | 17.24:1 | AAA pass 4.5:1 | |
| Muted text on background | 5.96:1 | AA pass 4.5:1 | |
| Label on primary | 4.52:1 | AA pass 4.5:1 | |
| Label on accent | 18.55:1 | AAA pass 4.5:1 | |
| Primary on background | 4.20:1 | AA Large pass 3:1 | |
| Accent on background | 17.23:1 | AAA pass 3:1 |
| Pair | Sample | Ratio | WCAG |
|---|---|---|---|
| Text on background | 12.30:1 | AAA pass 4.5:1 | |
| Text on surface | 11.62:1 | AAA pass 4.5:1 | |
| Muted text on background | 4.90:1 | AA pass 4.5:1 | |
| Label on primary | 4.52:1 | AA pass 4.5:1 | |
| Label on accent | 6.32:1 | AA pass 4.5:1 | |
| Primary on background | 4.46:1 | AA Large pass 3:1 | |
| Accent on background | 3.19: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 | #04070F (Text 1) | #0D1321 (Text 2) | #1B273A (Text 3) | #9F7932 (Text 4) | #D4C9B5 (Text 5) |
|---|---|---|---|---|---|
| #04070F | Same color | 1.09— | 1.34— | 5.04AA | 12.30AAA |
| #0D1321 | 1.09— | Same color | 1.23— | 4.64AA | 11.32AAA |
| #1B273A | 1.34— | 1.23— | Same color | 3.76AA Large | 9.17AAA |
| #9F7932 | 5.04AA | 4.64AA | 3.76AA Large | Same color | 2.44— |
| #D4C9B5 | 12.30AAA | 11.32AAA | 9.17AAA | 2.44— | Same color |
Shades
Shades and tints (50–950)
