Commonsense is a shadcn/ui theme built around a yellow primary color (#dfbb58) with green accents (#c0df58). The light mode uses a neutral background (#fefdfb). Dark mode keeps the yellow primary (#dfbb58) on a neutral background (#040301).
| Token | Light | Dark |
|---|---|---|
| Background | #fefdfbsnow | #040301black |
| Foreground | #090701black | #fbfaf9snow |
| Card | #fefdfbsnow | #040301black |
| Card foreground | #090701black | #fbfaf9snow |
| Popover | #fefdfbsnow | #040301black |
| Popover foreground | #090701black | #fbfaf9snow |
| Primary | #dfbb58sandybrown | #dfbb58sandybrown |
| Primary foreground | #040301black | #040301black |
| Secondary | #df7758indianred | #df7758indianred |
| Secondary foreground | #040201black | #040201black |
| Muted | #e8e4e3gainsboro | #1c1817black |
| Muted foreground | #5d504cdimgray | #b3a6a2darkgray |
| Accent | #c0df58darkkhaki | #c0df58darkkhaki |
| Accent foreground | #030401black | #030401black |
| Destructive | #e05606chocolate | #f96f1fchocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #dfbb58sandybrown | #dfbb58sandybrown |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.81:1 | AAA |
| Text on card | 19.81:1 | AAA |
| Primary button | 11.19:1 | AAA |
| Secondary button | 6.84:1 | AA |
| Muted text | 6.12:1 | AA |
| Accent | 13.64:1 | AAA |
| Destructive | 3.82:1 | AA Large |
| Text on background | 19.75:1 | AAA |
| Text on card | 19.75:1 | AAA |
| Primary button | 11.19:1 | AAA |
| Secondary button | 6.84:1 | AA |
| Muted text | 7.45:1 | AAA |
| Accent | 13.64:1 | AAA |
| Destructive | 7.33:1 | AAA |
Paste this into your globals.css to use Commonsense in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.003 90.14);
--foreground: oklch(0.128 0.021 96.892);
--muted: oklch(0.922 0.005 37.716);
--muted-foreground: oklch(0.442 0.018 37.608);
--popover: oklch(0.994 0.003 90.14);
--popover-foreground: oklch(0.128 0.021 96.892);
--card: oklch(0.994 0.003 90.14);
--card-foreground: oklch(0.128 0.021 96.892);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.805 0.125 89.351);
--primary-foreground: oklch(0.101 0.014 96.157);
--secondary: oklch(0.682 0.137 37.7);
--secondary-foreground: oklch(0.088 0.013 47.114);
--accent: oklch(0.855 0.164 121.089);
--accent-foreground: oklch(0.104 0.018 117.444);
--destructive: oklch(0.627 0.187 42.109);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.805 0.125 89.351);
--chart-1: oklch(0.805 0.125 89.351);
--chart-2: oklch(0.682 0.137 37.7);
--chart-3: oklch(0.855 0.164 121.089);
--chart-4: oklch(0.704 0.126 37.714);
--chart-5: oklch(0.81 0.129 89.199);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.099 0.012 95.157);
--foreground: oklch(0.986 0.001 90.13);
--muted: oklch(0.214 0.007 37.62);
--muted-foreground: oklch(0.736 0.016 37.652);
--popover: oklch(0.099 0.012 95.157);
--popover-foreground: oklch(0.986 0.001 90.13);
--card: oklch(0.099 0.012 95.157);
--card-foreground: oklch(0.986 0.001 90.13);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.805 0.125 89.351);
--primary-foreground: oklch(0.101 0.014 96.157);
--secondary: oklch(0.682 0.137 37.7);
--secondary-foreground: oklch(0.088 0.013 47.114);
--accent: oklch(0.855 0.164 121.089);
--accent-foreground: oklch(0.104 0.018 117.444);
--destructive: oklch(0.7 0.188 45.092);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.805 0.125 89.351);
--chart-1: oklch(0.805 0.125 89.351);
--chart-2: oklch(0.682 0.137 37.7);
--chart-3: oklch(0.855 0.164 121.089);
--chart-4: oklch(0.704 0.126 37.714);
--chart-5: oklch(0.81 0.129 89.199);
}