Center is a shadcn/ui theme built around a deep green primary color (#157519) with deep purple accents (#751570). The light mode uses a neutral background (#fbfdfc). Dark mode keeps the deep green primary (#157519) on a neutral background (#020302).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfdfcwhite | #020302black |
| Foreground | #000000black | #fcfdfcwhite |
| Card | #f8fcf8mintcream | #030703black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f8fcf8mintcream | #030703black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #157519forestgreen | #157519forestgreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #751570purple | #751570purple |
| Secondary foreground | #f5c7f3lavender | #f5c7f3lavender |
| Muted | #dbd7dagainsboro | #282428darkslategray |
| Muted foreground | #686468dimgray | #9b979bdarkgray |
| Accent | #751570purple | #751570purple |
| Accent foreground | #f5c7f3lavender | #f5c7f3lavender |
| Destructive | #962f03saddlebrown | #fb6b2dtomato |
| Destructive foreground | #fedccdbisque | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #157519forestgreen | #157519forestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.62:1 | AAA |
| Text on card | 20.25:1 | AAA |
| Primary button | 5.84:1 | AA |
| Secondary button | 6.84:1 | AA |
| Muted text | 4.07:1 | AA Large |
| Accent | 6.84:1 | AA |
| Destructive | 6.03:1 | AA |
| Text on background | 20.23:1 | AAA |
| Text on card | 20.27:1 | AAA |
| Primary button | 5.84:1 | AA |
| Secondary button | 6.84:1 | AA |
| Muted text | 5.29:1 | AA |
| Accent | 6.84:1 | AA |
| Destructive | 7.22:1 | AAA |
Paste this into your globals.css to use Center in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.003 147.008);
--foreground: oklch(0 0 0);
--muted: oklch(0.883 0.006 327.105);
--muted-foreground: oklch(0.508 0.008 327.181);
--popover: oklch(0.987 0.006 146.977);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.987 0.006 146.977);
--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.491 0.152 143.329);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.402 0.164 330.418);
--secondary-foreground: oklch(0.882 0.078 327.819);
--accent: oklch(0.402 0.164 330.418);
--accent-foreground: oklch(0.882 0.078 327.819);
--destructive: oklch(0.456 0.145 38.587);
--destructive-foreground: oklch(0.918 0.043 44.568);
--ring: oklch(0.491 0.152 143.329);
--chart-1: oklch(0.491 0.152 143.329);
--chart-2: oklch(0.402 0.164 330.418);
--chart-3: oklch(0.402 0.164 330.418);
--chart-4: oklch(0.433 0.178 330.448);
--chart-5: oklch(0.497 0.156 143.244);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.095 0.012 146.111);
--foreground: oklch(0.993 0.003 147.012);
--muted: oklch(0.267 0.009 327.333);
--muted-foreground: oklch(0.681 0.007 327.137);
--popover: oklch(0.12 0.015 146.111);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.12 0.015 146.111);
--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.491 0.152 143.329);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.402 0.164 330.418);
--secondary-foreground: oklch(0.882 0.078 327.819);
--accent: oklch(0.402 0.164 330.418);
--accent-foreground: oklch(0.882 0.078 327.819);
--destructive: oklch(0.697 0.19 41.158);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.491 0.152 143.329);
--chart-1: oklch(0.491 0.152 143.329);
--chart-2: oklch(0.402 0.164 330.418);
--chart-3: oklch(0.402 0.164 330.418);
--chart-4: oklch(0.433 0.178 330.448);
--chart-5: oklch(0.497 0.156 143.244);
}