Unhappy is a shadcn/ui theme built around a deep pink primary color (#7d1751) with deep blue accents (#17517d). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep pink primary (#7d1751) on a neutral background (#030203).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030203black |
| Foreground | #040103black | #f9f6f8whitesmoke |
| Card | #ffffffwhite | #030203black |
| Card foreground | #040103black | #f9f6f8whitesmoke |
| Popover | #ffffffwhite | #030203black |
| Popover foreground | #040103black | #f9f6f8whitesmoke |
| Primary | #7d1751purple | #7d1751purple |
| Primary foreground | #f6d0e6mistyrose | #f6d0e6mistyrose |
| Secondary | #517d17darkolivegreen | #517d17darkolivegreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e7efdcbeige | #1b2310black |
| Muted foreground | #5f6657dimgray | #a2a899darkgray |
| Accent | #17517ddarkslategray | #17517ddarkslategray |
| Accent foreground | #d0e6f6lavender | #d0e6f6lavender |
| Destructive | #b91913firebrick | #d41d16firebrick |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7d1751purple | #7d1751purple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.77:1 | AAA |
| Text on card | 20.77:1 | AAA |
| Primary button | 7.14:1 | AAA |
| Secondary button | 4.89:1 | AA |
| Muted text | 5.03:1 | AA |
| Accent | 6.52:1 | AA |
| Destructive | 6.56:1 | AA |
| Text on background | 19.31:1 | AAA |
| Text on card | 19.31:1 | AAA |
| Primary button | 7.14:1 | AAA |
| Secondary button | 4.89:1 | AA |
| Muted text | 6.64:1 | AA |
| Accent | 6.52:1 | AA |
| Destructive | 5.25:1 | AA |
Paste this into your globals.css to use Unhappy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.085 0.015 341.829);
--muted: oklch(0.941 0.026 126.119);
--muted-foreground: oklch(0.5 0.025 126.413);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.085 0.015 341.829);
--card: oklch(1 0 180);
--card-foreground: oklch(0.085 0.015 341.829);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.401 0.146 351.466);
--primary-foreground: oklch(0.896 0.052 343.138);
--secondary: oklch(0.537 0.136 131.007);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.42 0.094 246.165);
--accent-foreground: oklch(0.912 0.033 240.79);
--destructive: oklch(0.502 0.193 28.811);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.401 0.146 351.466);
--chart-1: oklch(0.401 0.146 351.466);
--chart-2: oklch(0.537 0.136 131.007);
--chart-3: oklch(0.42 0.094 246.165);
--chart-4: oklch(0.577 0.147 131.087);
--chart-5: oklch(0.404 0.15 351.914);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.088 0.009 341.821);
--foreground: oklch(0.975 0.004 341.915);
--muted: oklch(0.242 0.036 127.945);
--muted-foreground: oklch(0.723 0.023 126.162);
--popover: oklch(0.088 0.009 341.821);
--popover-foreground: oklch(0.975 0.004 341.915);
--card: oklch(0.088 0.009 341.821);
--card-foreground: oklch(0.975 0.004 341.915);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.401 0.146 351.466);
--primary-foreground: oklch(0.896 0.052 343.138);
--secondary: oklch(0.537 0.136 131.007);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.42 0.094 246.165);
--accent-foreground: oklch(0.912 0.033 240.79);
--destructive: oklch(0.557 0.215 28.883);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.401 0.146 351.466);
--chart-1: oklch(0.401 0.146 351.466);
--chart-2: oklch(0.537 0.136 131.007);
--chart-3: oklch(0.42 0.094 246.165);
--chart-4: oklch(0.577 0.147 131.087);
--chart-5: oklch(0.404 0.15 351.914);
}