Part is a shadcn/ui theme built around a muted deep green primary color (#253b21) with muted deep green accents (#213b2a). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#253b21) on a green-tinted background (#061004).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #061004black |
| Foreground | #071604black | #f9fcf8mintcream |
| Card | #ffffffwhite | #061004black |
| Card foreground | #071604black | #f9fcf8mintcream |
| Popover | #ffffffwhite | #061004black |
| Popover foreground | #071604black | #f9fcf8mintcream |
| Primary | #253b21darkslategray | #253b21darkslategray |
| Primary foreground | #bcd7b7silver | #bcd7b7silver |
| Secondary | #323b21darkslategray | #323b21darkslategray |
| Secondary foreground | #ccd7b7silver | #ccd7b7silver |
| Muted | #e3e8d9gainsboro | #212617black |
| Muted foreground | #4f4f4fdarkslategray | #b0b0b0darkgray |
| Accent | #213b2adarkslategray | #213b2adarkslategray |
| Accent foreground | #b7d7c2silver | #b7d7c2silver |
| Destructive | #5e0908maroon | #ed2926crimson |
| Destructive foreground | #f7a2a1lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #253b21darkslategray | #253b21darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.65:1 | AAA |
| Text on card | 18.65:1 | AAA |
| Primary button | 7.86:1 | AAA |
| Secondary button | 7.86:1 | AAA |
| Muted text | 6.55:1 | AA |
| Accent | 7.86:1 | AAA |
| Destructive | 6.98:1 | AA |
| Text on background | 18.70:1 | AAA |
| Text on card | 18.70:1 | AAA |
| Primary button | 7.86:1 | AAA |
| Secondary button | 7.86:1 | AAA |
| Muted text | 7.13:1 | AAA |
| Accent | 7.86:1 | AAA |
| Destructive | 4.23:1 | AA Large |
Paste this into your globals.css to use Part in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.179 0.042 139.688);
--muted: oklch(0.923 0.021 122.575);
--muted-foreground: oklch(0.428 0 180);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.179 0.042 139.688);
--card: oklch(1 0 180);
--card-foreground: oklch(0.179 0.042 139.688);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.325 0.052 140.758);
--primary-foreground: oklch(0.85 0.052 140.934);
--secondary: oklch(0.335 0.044 124.434);
--secondary-foreground: oklch(0.861 0.044 123.026);
--accent: oklch(0.325 0.044 154.701);
--accent-foreground: oklch(0.849 0.044 156.856);
--destructive: oklch(0.311 0.117 28.131);
--destructive-foreground: oklch(0.796 0.102 20.647);
--ring: oklch(0.325 0.052 140.758);
--chart-1: oklch(0.325 0.052 140.758);
--chart-2: oklch(0.335 0.044 124.434);
--chart-3: oklch(0.325 0.044 154.701);
--chart-4: oklch(0.371 0.05 124.505);
--chart-5: oklch(0.328 0.057 140.744);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.159 0.032 139.563);
--foreground: oklch(0.987 0.005 141.053);
--muted: oklch(0.259 0.028 124.017);
--muted-foreground: oklch(0.757 0 180);
--popover: oklch(0.159 0.032 139.563);
--popover-foreground: oklch(0.987 0.005 141.053);
--card: oklch(0.159 0.032 139.563);
--card-foreground: oklch(0.987 0.005 141.053);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.325 0.052 140.758);
--primary-foreground: oklch(0.85 0.052 140.934);
--secondary: oklch(0.335 0.044 124.434);
--secondary-foreground: oklch(0.861 0.044 123.026);
--accent: oklch(0.325 0.044 154.701);
--accent-foreground: oklch(0.849 0.044 156.856);
--destructive: oklch(0.611 0.229 27.967);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.325 0.052 140.758);
--chart-1: oklch(0.325 0.052 140.758);
--chart-2: oklch(0.335 0.044 124.434);
--chart-3: oklch(0.325 0.044 154.701);
--chart-4: oklch(0.371 0.05 124.505);
--chart-5: oklch(0.328 0.057 140.744);
}