Midnight Synth is a shadcn/ui theme built around a vivid violet primary color (#9d47ff) with vivid deep violet accents (#29006b). The light mode uses a violet-tinted background (#0c001f). Dark mode keeps the vivid violet primary (#9d47ff) on a violet-tinted background (#0c001f).
| Token | Light | Dark |
|---|---|---|
| Background | #0c001fblack | #0c001fblack |
| Foreground | #ddd6falavender | #ddd6falavender |
| Card | #080014black | #080014black |
| Card foreground | #f0edfdaliceblue | #f0edfdaliceblue |
| Popover | #06000fblack | #06000fblack |
| Popover foreground | #ffffffwhite | #ffffffwhite |
| Primary | #9d47ffblueviolet | #9d47ffblueviolet |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #beacd2silver | #beacd2silver |
| Secondary foreground | #251b32darkslategray | #251b32darkslategray |
| Muted | #25222bdarkslategray | #25222bdarkslategray |
| Muted foreground | #a39bb0darkgray | #a39bb0darkgray |
| Accent | #29006bmidnightblue | #29006bmidnightblue |
| Accent foreground | #c39effplum | #c39effplum |
| Destructive | #e23318orangered | #e23318orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #160335black | #160335black |
| Input | #1c0444midnightblue | #1c0444midnightblue |
| Ring | #9d47ffblueviolet | #9d47ffblueviolet |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 14.56:1 | AAA |
| Text on card | 17.87:1 | AAA |
| Primary button | 4.38:1 | AA Large |
| Secondary button | 7.82:1 | AAA |
| Muted text | 5.87:1 | AA |
| Accent | 7.38:1 | AAA |
| Destructive | 4.44:1 | AA Large |
| Text on background | 14.56:1 | AAA |
| Text on card | 17.87:1 | AAA |
| Primary button | 4.38:1 | AA Large |
| Secondary button | 7.82:1 | AAA |
| Muted text | 5.87:1 | AA |
| Accent | 7.38:1 | AAA |
| Destructive | 4.44:1 | AA Large |
Paste this into your globals.css to use Midnight Synth in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.13 0.07 298.218);
--foreground: oklch(0.892 0.05 293.774);
--muted: oklch(0.258 0.018 302.624);
--muted-foreground: oklch(0.704 0.032 302.964);
--popover: oklch(0.097 0.05 304.793);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.109 0.057 302.669);
--card-foreground: oklch(0.952 0.022 294.399);
--border: oklch(0.182 0.091 293.423);
--input: oklch(0.209 0.108 291.785);
--primary: oklch(0.605 0.254 300.001);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.772 0.057 306.209);
--secondary-foreground: oklch(0.246 0.045 304.793);
--accent: oklch(0.269 0.155 287.449);
--accent-foreground: oklch(0.77 0.14 300.824);
--destructive: oklch(0.596 0.214 31.569);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.605 0.254 300.001);
--chart-1: oklch(0.605 0.254 300.001);
--chart-2: oklch(0.772 0.057 306.209);
--chart-3: oklch(0.269 0.155 287.449);
--chart-4: oklch(0.8 0.05 306.352);
--chart-5: oklch(0.604 0.26 299.685);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.13 0.07 298.218);
--foreground: oklch(0.892 0.05 293.774);
--muted: oklch(0.258 0.018 302.624);
--muted-foreground: oklch(0.704 0.032 302.964);
--popover: oklch(0.097 0.05 304.793);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.109 0.057 302.669);
--card-foreground: oklch(0.952 0.022 294.399);
--border: oklch(0.182 0.091 293.423);
--input: oklch(0.209 0.108 291.785);
--primary: oklch(0.605 0.254 300.001);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.772 0.057 306.209);
--secondary-foreground: oklch(0.246 0.045 304.793);
--accent: oklch(0.269 0.155 287.449);
--accent-foreground: oklch(0.77 0.14 300.824);
--destructive: oklch(0.596 0.214 31.569);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.605 0.254 300.001);
--chart-1: oklch(0.605 0.254 300.001);
--chart-2: oklch(0.772 0.057 306.209);
--chart-3: oklch(0.269 0.155 287.449);
--chart-4: oklch(0.8 0.05 306.352);
--chart-5: oklch(0.604 0.26 299.685);
}