Cheerful is a shadcn/ui theme built around a near-black primary color (#242423) with near-black accents (#232424). The light mode uses a neutral background (#fdfaf7). Dark mode keeps the near-black primary (#242423) on a neutral background (#040301).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfaf7snow | #040301black |
| Foreground | #0d0803black | #f9f7f5whitesmoke |
| Card | #fbf7f3floralwhite | #080503black |
| Card foreground | #080502black | #fbfaf9snow |
| Popover | #fbf7f3floralwhite | #080503black |
| Popover foreground | #080502black | #fbfaf9snow |
| Primary | #242423black | #242423black |
| Primary foreground | #bebdbbsilver | #bebdbbsilver |
| Secondary | #232424black | #232424black |
| Secondary foreground | #bbbdbesilver | #bbbdbesilver |
| Muted | #cbd8e7gainsboro | #182634darkslategray |
| Muted foreground | #40454adarkslategray | #b5babfsilver |
| Accent | #232424black | #232424black |
| Accent foreground | #bbbdbesilver | #bbbdbesilver |
| Destructive | #680a08maroon | #ed201dcrimson |
| Destructive foreground | #f8abaalightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #242423black | #242423black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.16:1 | AAA |
| Text on card | 19.14:1 | AAA |
| Primary button | 8.28:1 | AAA |
| Secondary button | 8.27:1 | AAA |
| Muted text | 6.70:1 | AA |
| Accent | 8.27:1 | AAA |
| Destructive | 6.97:1 | AA |
| Text on background | 19.32:1 | AAA |
| Text on card | 19.49:1 | AAA |
| Primary button | 8.28:1 | AAA |
| Secondary button | 8.27:1 | AAA |
| Muted text | 7.87:1 | AAA |
| Accent | 8.27:1 | AAA |
| Destructive | 4.36:1 | AA Large |
Paste this into your globals.css to use Cheerful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.986 0.005 69.604);
--foreground: oklch(0.138 0.018 77.792);
--muted: oklch(0.877 0.024 249.9);
--muted-foreground: oklch(0.387 0.01 249.894);
--popover: oklch(0.979 0.007 69.58);
--popover-foreground: oklch(0.12 0.015 78.709);
--card: oklch(0.979 0.007 69.58);
--card-foreground: oklch(0.12 0.015 78.709);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.26 0.002 69.585);
--primary-foreground: oklch(0.798 0.002 69.621);
--secondary: oklch(0.259 0.002 249.712);
--secondary-foreground: oklch(0.797 0.002 249.679);
--accent: oklch(0.259 0.002 249.712);
--accent-foreground: oklch(0.797 0.002 249.679);
--destructive: oklch(0.332 0.126 28.225);
--destructive-foreground: oklch(0.816 0.091 20.307);
--ring: oklch(0.26 0.002 69.585);
--chart-1: oklch(0.26 0.002 69.585);
--chart-2: oklch(0.259 0.002 249.712);
--chart-3: oklch(0.259 0.002 249.712);
--chart-4: oklch(0.29 0.002 249.716);
--chart-5: oklch(0.26 0.004 69.484);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.094 0.009 76.474);
--foreground: oklch(0.978 0.003 69.617);
--muted: oklch(0.263 0.033 250.763);
--muted-foreground: oklch(0.787 0.009 249.754);
--popover: oklch(0.119 0.011 76.474);
--popover-foreground: oklch(0.986 0.002 69.628);
--card: oklch(0.119 0.011 76.474);
--card-foreground: oklch(0.986 0.002 69.628);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.26 0.002 69.585);
--primary-foreground: oklch(0.798 0.002 69.621);
--secondary: oklch(0.259 0.002 249.712);
--secondary-foreground: oklch(0.797 0.002 249.679);
--accent: oklch(0.259 0.002 249.712);
--accent-foreground: oklch(0.797 0.002 249.679);
--destructive: oklch(0.604 0.233 28.459);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.26 0.002 69.585);
--chart-1: oklch(0.26 0.002 69.585);
--chart-2: oklch(0.259 0.002 249.712);
--chart-3: oklch(0.259 0.002 249.712);
--chart-4: oklch(0.29 0.002 249.716);
--chart-5: oklch(0.26 0.004 69.484);
}