Conventional is a shadcn/ui theme built around a green primary color (#1d9f24) with muted light green accents (#c3dac5). The light mode uses a neutral background (#fbfdfc). Dark mode keeps the green primary (#1d9f24) on a neutral background (#010401).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfdfcwhite | #010401black |
| Foreground | #051506black | #f9fbf9mintcream |
| Card | #f8fcf8mintcream | #020803black |
| Card foreground | #041005black | #fcfdfcwhite |
| Popover | #f8fcf8mintcream | #020803black |
| Popover foreground | #041005black | #fcfdfcwhite |
| Primary | #1d9f24forestgreen | #1d9f24forestgreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #dae2dagainsboro | #293d2adarkslategray |
| Secondary foreground | #3c4e3ddarkslategray | #c2d6c3silver |
| Muted | #dce4ddgainsboro | #1b231bblack |
| Muted foreground | #3e413fdarkslategray | #bec1besilver |
| Accent | #c3dac5lightgrey | #39603bdarkslategray |
| Accent foreground | #29422adarkslategray | #ffffffwhite |
| Destructive | #af3a12firebrick | #e85321chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #1d9f24forestgreen | #1d9f24forestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.47:1 | AAA |
| Text on card | 18.72:1 | AAA |
| Primary button | 3.46:1 | AA Large |
| Secondary button | 6.75:1 | AA |
| Muted text | 7.98:1 | AAA |
| Accent | 7.40:1 | AAA |
| Destructive | 6.10:1 | AA |
| Text on background | 19.81:1 | AAA |
| Text on card | 19.83:1 | AAA |
| Primary button | 3.46:1 | AA Large |
| Secondary button | 7.61:1 | AAA |
| Muted text | 8.91:1 | AAA |
| Accent | 7.24:1 | AAA |
| Destructive | 3.69:1 | AA Large |
Paste this into your globals.css to use Conventional in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.003 147.008);
--foreground: oklch(0.174 0.038 145.014);
--muted: oklch(0.912 0.013 146.903);
--muted-foreground: oklch(0.372 0.005 146.905);
--popover: oklch(0.987 0.006 146.977);
--popover-foreground: oklch(0.158 0.033 145.232);
--card: oklch(0.987 0.006 146.977);
--card-foreground: oklch(0.158 0.033 145.232);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.614 0.192 143.263);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.904 0.014 146.89);
--secondary-foreground: oklch(0.402 0.036 146.162);
--accent: oklch(0.865 0.037 146.627);
--accent-foreground: oklch(0.351 0.05 145.579);
--destructive: oklch(0.514 0.16 36.989);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.614 0.192 143.263);
--chart-1: oklch(0.614 0.192 143.263);
--chart-2: oklch(0.904 0.014 146.89);
--chart-3: oklch(0.865 0.037 146.627);
--chart-4: oklch(0.927 0.011 146.928);
--chart-5: oklch(0.622 0.197 143.179);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.097 0.018 145.582);
--foreground: oklch(0.986 0.003 147.012);
--muted: oklch(0.244 0.018 146.313);
--muted-foreground: oklch(0.807 0.004 146.988);
--popover: oklch(0.122 0.023 145.582);
--popover-foreground: oklch(0.993 0.001 147.025);
--card: oklch(0.122 0.023 145.582);
--card-foreground: oklch(0.993 0.001 147.025);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.614 0.192 143.263);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.337 0.042 145.775);
--secondary-foreground: oklch(0.856 0.034 146.657);
--accent: oklch(0.449 0.073 145.361);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.637 0.193 37.343);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.614 0.192 143.263);
--chart-1: oklch(0.614 0.192 143.263);
--chart-2: oklch(0.337 0.042 145.775);
--chart-3: oklch(0.449 0.073 145.361);
--chart-4: oklch(0.369 0.048 145.74);
--chart-5: oklch(0.622 0.197 143.179);
}