Sudden is a shadcn/ui theme built around a near-black primary color (#050307) with near-black accents (#050703). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the near-black primary (#050307) on a violet-tinted background (#08040b).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfbfewhite | #08040bblack |
| Foreground | #030104black | #f8f6f8whitesmoke |
| Card | #fdfbfewhite | #08040bblack |
| Card foreground | #030104black | #f8f6f8whitesmoke |
| Popover | #fdfbfewhite | #08040bblack |
| Popover foreground | #030104black | #f8f6f8whitesmoke |
| Primary | #050307black | #050307black |
| Primary foreground | #a57dbfmediumpurple | #a57dbfmediumpurple |
| Secondary | #050703black | #050703black |
| Secondary foreground | #98bf7ddarkseagreen | #98bf7ddarkseagreen |
| Muted | #eff6eahoneydew | #0e1509black |
| Muted foreground | #5e605cdimgray | #a0a39fdarkgray |
| Accent | #050703black | #050703black |
| Accent foreground | #98bf7ddarkseagreen | #98bf7ddarkseagreen |
| Destructive | #c72505firebrick | #f9330borangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #050307black | #050307black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.18:1 | AAA |
| Text on card | 20.18:1 | AAA |
| Primary button | 6.13:1 | AA |
| Secondary button | 9.72:1 | AAA |
| Muted text | 5.74:1 | AA |
| Accent | 9.72:1 | AAA |
| Destructive | 5.67:1 | AA |
| Text on background | 18.90:1 | AAA |
| Text on card | 18.90:1 | AAA |
| Primary button | 6.13:1 | AA |
| Secondary button | 9.72:1 | AAA |
| Muted text | 7.27:1 | AAA |
| Accent | 9.72:1 | AAA |
| Destructive | 3.82:1 | AA Large |
Paste this into your globals.css to use Sudden in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 312.325);
--foreground: oklch(0.082 0.018 314.167);
--muted: oklch(0.963 0.017 132.495);
--muted-foreground: oklch(0.487 0.007 132.46);
--popover: oklch(0.99 0.004 312.325);
--popover-foreground: oklch(0.082 0.018 314.167);
--card: oklch(0.99 0.004 312.325);
--card-foreground: oklch(0.082 0.018 314.167);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.109 0.013 313.411);
--primary-foreground: oklch(0.653 0.105 311.135);
--secondary: oklch(0.122 0.012 131.45);
--secondary-foreground: oklch(0.76 0.1 133.477);
--accent: oklch(0.122 0.012 131.45);
--accent-foreground: oklch(0.76 0.1 133.477);
--destructive: oklch(0.536 0.199 32.12);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.109 0.013 313.411);
--chart-1: oklch(0.109 0.013 313.411);
--chart-2: oklch(0.122 0.012 131.45);
--chart-3: oklch(0.122 0.012 131.45);
--chart-4: oklch(0.169 0.019 133.127);
--chart-5: oklch(0.108 0.015 313.514);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.12 0.023 313.781);
--foreground: oklch(0.976 0.003 312.334);
--muted: oklch(0.185 0.026 133.532);
--muted-foreground: oklch(0.711 0.006 132.421);
--popover: oklch(0.12 0.023 313.781);
--popover-foreground: oklch(0.976 0.003 312.334);
--card: oklch(0.12 0.023 313.781);
--card-foreground: oklch(0.976 0.003 312.334);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.109 0.013 313.411);
--primary-foreground: oklch(0.653 0.105 311.135);
--secondary: oklch(0.122 0.012 131.45);
--secondary-foreground: oklch(0.76 0.1 133.477);
--accent: oklch(0.122 0.012 131.45);
--accent-foreground: oklch(0.76 0.1 133.477);
--destructive: oklch(0.636 0.235 32.146);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.109 0.013 313.411);
--chart-1: oklch(0.109 0.013 313.411);
--chart-2: oklch(0.122 0.012 131.45);
--chart-3: oklch(0.122 0.012 131.45);
--chart-4: oklch(0.169 0.019 133.127);
--chart-5: oklch(0.108 0.015 313.514);
}