PreviewingGo to this paletteOpen in generator
Code
/* Midnight Black — colorset.net */
:root {
--color-1: #0D1117;
--color-2: #161B22;
--color-3: #21262D;
--color-4: #30363D;
--color-5: #484F58;
--color-bg: #F4F7FA;
--color-surface: #EBEEF1;
--color-border: #D0D5DC;
--color-text: #0D1117;
--color-muted: #62676F;
--color-primary: #484F58;
--color-on-primary: #FFFFFF;
--color-accent: #21262D;
--color-on-accent: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0D1117;
--color-surface: #171B22;
--color-border: #2A3039;
--color-text: #9FA7B1;
--color-muted: #7E858F;
--color-primary: #616872;
--color-on-primary: #FFFFFF;
--color-accent: #949AA3;
--color-on-accent: #0D1117;
}
}
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 #484F58 | from palette · color 1 |
| Surface | derived | derived |
| Border | derived | derived |
| Text | from palette · color 1 | adjusted for contrast · from #484F58 |
| Muted text | derived | derived |
| Primary | from palette · color 5 | adjusted for contrast · from #484F58 |
| On primary | derived | derived |
| Accent | from palette · color 3 | adjusted for contrast · from #484F58 |
| On accent | derived | derived |
Contrast
| Pair | Sample | Ratio | WCAG |
|---|---|---|---|
| Text on background | 17.60:1 | AAA pass 4.5:1 | |
| Text on surface | 16.25:1 | AAA pass 4.5:1 | |
| Muted text on background | 5.29:1 | AA pass 4.5:1 | |
| Label on primary | 8.28:1 | AAA pass 4.5:1 | |
| Label on accent | 15.22:1 | AAA pass 4.5:1 | |
| Primary on background | 7.71:1 | AAA pass 3:1 | |
| Accent on background | 14.16:1 | AAA pass 3:1 |
| Pair | Sample | Ratio | WCAG |
|---|---|---|---|
| Text on background | 7.78:1 | AAA pass 4.5:1 | |
| Text on surface | 7.10:1 | AAA pass 4.5:1 | |
| Muted text on background | 5.08:1 | AA pass 4.5:1 | |
| Label on primary | 5.63:1 | AA pass 4.5:1 | |
| Label on accent | 6.68:1 | AA pass 4.5:1 | |
| Primary on background | 3.36:1 | AA Large pass 3:1 | |
| Accent on background | 6.68:1 | AA 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 | #0D1117 (Text 1) | #161B22 (Text 2) | #21262D (Text 3) | #30363D (Text 4) | #484F58 (Text 5) |
|---|---|---|---|---|---|
| #0D1117 | Same color | 1.09— | 1.24— | 1.55— | 2.28— |
| #161B22 | 1.09— | Same color | 1.14— | 1.42— | 2.09— |
| #21262D | 1.24— | 1.14— | Same color | 1.25— | 1.84— |
| #30363D | 1.55— | 1.42— | 1.25— | Same color | 1.47— |
| #484F58 | 2.28— | 2.09— | 1.84— | 1.47— | Same color |
Shades
Shades and tints (50–950)
