Better is a shadcn/ui theme built around a deep green primary color (#1e7411) with muted light green accents (#cedbcc). The light mode uses a neutral background (#fcfefb). Dark mode keeps the deep green primary (#1e7411) on a green-tinted background (#050b05).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfefbwhite | #050b05black |
| Foreground | #081306black | #ffffffwhite |
| Card | #fcfefbwhite | #050b05black |
| Card foreground | #081306black | #ffffffwhite |
| Popover | #fcfefbwhite | #050b05black |
| Popover foreground | #081306black | #ffffffwhite |
| Primary | #1e7411forestgreen | #1e7411forestgreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #e9ede8linen | #30372fdarkslategray |
| Secondary foreground | #4a5b48darkslategray | #c9d0c8lightgrey |
| Muted | #d9e5d7gainsboro | #1c281ablack |
| Muted foreground | #455143darkslategray | #b0bcaedarkgray |
| Accent | #cedbcclightgrey | #40573ddarkslategray |
| Accent foreground | #334530darkslategray | #dfe8degainsboro |
| Destructive | #8c1a08darkred | #f2391corangered |
| Destructive foreground | #fcd1capink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #1e7411forestgreen | #1e7411forestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.67:1 | AAA |
| Text on card | 18.67:1 | AAA |
| Primary button | 5.89:1 | AA |
| Secondary button | 6.15:1 | AA |
| Muted text | 6.41:1 | AA |
| Accent | 7.21:1 | AAA |
| Destructive | 6.68:1 | AA |
| Text on background | 19.89:1 | AAA |
| Text on card | 19.89:1 | AAA |
| Primary button | 5.89:1 | AA |
| Secondary button | 7.78:1 | AAA |
| Muted text | 7.77:1 | AAA |
| Accent | 6.29:1 | AA |
| Destructive | 3.91:1 | AA Large |
Paste this into your globals.css to use Better in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.004 141.581);
--foreground: oklch(0.172 0.031 140.6);
--muted: oklch(0.908 0.023 141.522);
--muted-foreground: oklch(0.42 0.029 141.398);
--popover: oklch(0.994 0.004 141.581);
--popover-foreground: oklch(0.172 0.031 140.6);
--card: oklch(0.994 0.004 141.581);
--card-foreground: oklch(0.172 0.031 140.6);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.49 0.153 141.394);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.942 0.008 141.569);
--secondary-foreground: oklch(0.452 0.038 141.359);
--accent: oklch(0.878 0.026 141.51);
--accent-foreground: oklch(0.369 0.042 141.275);
--destructive: oklch(0.416 0.151 31.53);
--destructive-foreground: oklch(0.895 0.05 28.32);
--ring: oklch(0.49 0.153 141.394);
--chart-1: oklch(0.49 0.153 141.394);
--chart-2: oklch(0.942 0.008 141.569);
--chart-3: oklch(0.878 0.026 141.51);
--chart-4: oklch(0.964 0.005 141.578);
--chart-5: oklch(0.495 0.156 141.446);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.139 0.018 140.391);
--foreground: oklch(1 0 180);
--muted: oklch(0.261 0.03 141.271);
--muted-foreground: oklch(0.782 0.025 141.502);
--popover: oklch(0.139 0.018 140.391);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.139 0.018 140.391);
--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.49 0.153 141.394);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.328 0.017 141.445);
--secondary-foreground: oklch(0.85 0.014 141.548);
--accent: oklch(0.431 0.051 141.264);
--accent-foreground: oklch(0.922 0.016 141.542);
--destructive: oklch(0.628 0.224 31.6);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.49 0.153 141.394);
--chart-1: oklch(0.49 0.153 141.394);
--chart-2: oklch(0.328 0.017 141.445);
--chart-3: oklch(0.431 0.051 141.264);
--chart-4: oklch(0.358 0.019 141.441);
--chart-5: oklch(0.495 0.156 141.446);
}