Commonsense is a shadcn/ui theme built around a vivid deep blue primary color (#07215f) with vivid deep green accents (#215f07). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep blue primary (#07215f) on a neutral background (#010204).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #010204black |
| Foreground | #000000black | #f6f7f9whitesmoke |
| Card | #ffffffwhite | #010204black |
| Card foreground | #000000black | #f6f7f9whitesmoke |
| Popover | #ffffffwhite | #010204black |
| Popover foreground | #000000black | #f6f7f9whitesmoke |
| Primary | #07215fmidnightblue | #07215fmidnightblue |
| Primary foreground | #a0baf8lightskyblue | #a0baf8lightskyblue |
| Secondary | #5f0721maroon | #5f0721maroon |
| Secondary foreground | #f8a0balightpink | #f8a0balightpink |
| Muted | #e4dcdfgainsboro | #231b1dblack |
| Muted foreground | #535051darkslategray | #afacaddarkgray |
| Accent | #215f07darkgreen | #215f07darkgreen |
| Accent foreground | #baf8a0palegreen | #baf8a0palegreen |
| Destructive | #912c08saddlebrown | #f45c25tomato |
| Destructive foreground | #fcdbcfbisque | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #07215fmidnightblue | #07215fmidnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 7.79:1 | AAA |
| Secondary button | 6.95:1 | AA |
| Muted text | 5.94:1 | AA |
| Accent | 6.26:1 | AA |
| Destructive | 6.26:1 | AA |
| Text on background | 19.35:1 | AAA |
| Text on card | 19.35:1 | AAA |
| Primary button | 7.79:1 | AAA |
| Secondary button | 6.95:1 | AA |
| Muted text | 7.51:1 | AAA |
| Accent | 6.26:1 | AA |
| Destructive | 6.38:1 | AA |
Paste this into your globals.css to use Commonsense in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.903 0.009 356.952);
--muted-foreground: oklch(0.435 0.005 356.959);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(1 0 180);
--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.277 0.115 263.165);
--primary-foreground: oklch(0.793 0.094 266.37);
--secondary: oklch(0.316 0.119 11.9);
--secondary-foreground: oklch(0.8 0.11 0.427);
--accent: oklch(0.43 0.131 139.053);
--accent-foreground: oklch(0.917 0.132 136.667);
--destructive: oklch(0.445 0.142 37.267);
--destructive-foreground: oklch(0.916 0.041 41.028);
--ring: oklch(0.277 0.115 263.165);
--chart-1: oklch(0.277 0.115 263.165);
--chart-2: oklch(0.316 0.119 11.9);
--chart-3: oklch(0.43 0.131 139.053);
--chart-4: oklch(0.347 0.132 12.488);
--chart-5: oklch(0.277 0.119 262.99);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.085 0.01 260.629);
--foreground: oklch(0.976 0.003 267.405);
--muted: oklch(0.231 0.013 358.255);
--muted-foreground: oklch(0.747 0.004 356.811);
--popover: oklch(0.085 0.01 260.629);
--popover-foreground: oklch(0.976 0.003 267.405);
--card: oklch(0.085 0.01 260.629);
--card-foreground: oklch(0.976 0.003 267.405);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.277 0.115 263.165);
--primary-foreground: oklch(0.793 0.094 266.37);
--secondary: oklch(0.316 0.119 11.9);
--secondary-foreground: oklch(0.8 0.11 0.427);
--accent: oklch(0.43 0.131 139.053);
--accent-foreground: oklch(0.917 0.132 136.667);
--destructive: oklch(0.667 0.197 38.445);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.277 0.115 263.165);
--chart-1: oklch(0.277 0.115 263.165);
--chart-2: oklch(0.316 0.119 11.9);
--chart-3: oklch(0.43 0.131 139.053);
--chart-4: oklch(0.347 0.132 12.488);
--chart-5: oklch(0.277 0.119 262.99);
}