Unhappy is a shadcn/ui theme built around a neutral gray primary color (#564d4d) with muted red accents (#cfb1b0). The light mode uses a neutral background (#fefbfb). Dark mode keeps the neutral gray primary (#564d4d) on a neutral background (#070303).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfbsnow | #070303black |
| Foreground | #000000black | #ffffffwhite |
| Card | #fdf7f7snow | #0b0505black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fefbfbsnow | #070303black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #564d4ddarkslategray | #564d4ddarkslategray |
| Primary foreground | #ece9e9linen | #ece9e9linen |
| Secondary | #ded4d3lightgrey | #342423darkslategray |
| Secondary foreground | #493837darkslategray | #cfbab9silver |
| Muted | #f4eceblinen | #140b0bblack |
| Muted foreground | #625150dimgray | #af9e9ddarkgray |
| Accent | #cfb1b0silver | #56312fdarkolivegreen |
| Accent foreground | #2f1e1dblack | #e6d2d1gainsboro |
| Destructive | #a23811saddlebrown | #eb6b3dtomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #564d4ddarkslategray | #564d4ddarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.41:1 | AAA |
| Text on card | 19.83:1 | AAA |
| Primary button | 6.76:1 | AA |
| Secondary button | 7.59:1 | AAA |
| Muted text | 6.40:1 | AA |
| Accent | 7.99:1 | AAA |
| Destructive | 6.79:1 | AA |
| Text on background | 20.49:1 | AAA |
| Text on card | 20.24:1 | AAA |
| Primary button | 6.76:1 | AA |
| Secondary button | 8.01:1 | AAA |
| Muted text | 7.57:1 | AAA |
| Accent | 7.74:1 | AAA |
| Destructive | 6.70:1 | AA |
Paste this into your globals.css to use Unhappy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 20.93);
--foreground: oklch(0 0 0);
--muted: oklch(0.948 0.009 21.016);
--muted-foreground: oklch(0.453 0.023 21.582);
--popover: oklch(0.99 0.003 20.93);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.981 0.006 20.971);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.43 0.012 21.273);
--primary-foreground: oklch(0.937 0.003 20.923);
--secondary: oklch(0.878 0.011 21.054);
--secondary-foreground: oklch(0.358 0.024 21.857);
--accent: oklch(0.787 0.034 21.473);
--accent-foreground: oklch(0.257 0.028 22.525);
--destructive: oklch(0.487 0.148 38.066);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.43 0.012 21.273);
--chart-1: oklch(0.43 0.012 21.273);
--chart-2: oklch(0.878 0.011 21.054);
--chart-3: oklch(0.787 0.034 21.473);
--chart-4: oklch(0.902 0.009 21.016);
--chart-5: oklch(0.427 0.019 21.494);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.109 0.011 23.516);
--foreground: oklch(1 0 180);
--muted: oklch(0.162 0.015 22.304);
--muted-foreground: oklch(0.713 0.02 21.26);
--popover: oklch(0.109 0.011 23.516);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.124 0.013 23.511);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.43 0.012 21.273);
--primary-foreground: oklch(0.937 0.003 20.923);
--secondary: oklch(0.279 0.024 22.16);
--secondary-foreground: oklch(0.807 0.024 21.288);
--accent: oklch(0.358 0.054 23.332);
--accent-foreground: oklch(0.88 0.022 21.218);
--destructive: oklch(0.676 0.169 39.744);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.43 0.012 21.273);
--chart-1: oklch(0.43 0.012 21.273);
--chart-2: oklch(0.279 0.024 22.16);
--chart-3: oklch(0.358 0.054 23.332);
--chart-4: oklch(0.308 0.028 22.22);
--chart-5: oklch(0.427 0.019 21.494);
}