Petty is a shadcn/ui theme built around a green primary color (#78d73c) with muted green accents (#b2c4a6). The light mode uses a neutral background (#fcfdfb). Dark mode keeps the green primary (#78d73c) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdfbsnow | #000000black |
| Foreground | #091104black | #ffffffwhite |
| Card | #fcfdfbsnow | #000000black |
| Card foreground | #091104black | #ffffffwhite |
| Popover | #fcfdfbsnow | #000000black |
| Popover foreground | #091104black | #ffffffwhite |
| Primary | #78d73cyellowgreen | #78d73cyellowgreen |
| Primary foreground | #1e3b0cdarkgreen | #1e3b0cdarkgreen |
| Secondary | #cad4c4lightgrey | #1e211cblack |
| Secondary foreground | #313b2bdarkslategray | #b6beb1silver |
| Muted | #e7eee3beige | #161c11black |
| Muted foreground | #5b5e5adimgray | #a3a5a1darkgray |
| Accent | #b2c4a6darkgray | #2a3224darkslategray |
| Accent foreground | #1b2216black | #c2cebbsilver |
| Destructive | #862f03saddlebrown | #f96115orangered |
| Destructive foreground | #fdd3bepeachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #78d73cyellowgreen | #78d73cyellowgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.88:1 | AAA |
| Text on card | 18.88:1 | AAA |
| Primary button | 6.87:1 | AA |
| Secondary button | 7.64:1 | AAA |
| Muted text | 5.53:1 | AA |
| Accent | 8.79:1 | AAA |
| Destructive | 6.27:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 6.87:1 | AA |
| Secondary button | 8.49:1 | AAA |
| Muted text | 6.97:1 | AA |
| Accent | 8.10:1 | AAA |
| Destructive | 6.75:1 | AA |
Paste this into your globals.css to use Petty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.003 133.006);
--foreground: oklch(0.163 0.031 132.497);
--muted: oklch(0.94 0.016 133.106);
--muted-foreground: oklch(0.477 0.006 133.079);
--popover: oklch(0.994 0.003 133.006);
--popover-foreground: oklch(0.163 0.031 132.497);
--card: oklch(0.994 0.003 133.006);
--card-foreground: oklch(0.163 0.031 132.497);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.791 0.207 136.066);
--primary-foreground: oklch(0.319 0.08 135.81);
--secondary: oklch(0.857 0.023 133.173);
--secondary-foreground: oklch(0.337 0.029 133.616);
--accent: oklch(0.798 0.045 133.391);
--accent-foreground: oklch(0.24 0.023 133.701);
--destructive: oklch(0.428 0.129 41.174);
--destructive-foreground: oklch(0.898 0.055 48.084);
--ring: oklch(0.791 0.207 136.066);
--chart-1: oklch(0.791 0.207 136.066);
--chart-2: oklch(0.857 0.023 133.173);
--chart-3: oklch(0.798 0.045 133.391);
--chart-4: oklch(0.879 0.02 133.14);
--chart-5: oklch(0.799 0.214 136.232);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.218 0.023 133.787);
--muted-foreground: oklch(0.719 0.006 133.041);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.791 0.207 136.066);
--primary-foreground: oklch(0.319 0.08 135.81);
--secondary: oklch(0.244 0.011 133.316);
--secondary-foreground: oklch(0.792 0.02 133.16);
--accent: oklch(0.306 0.027 133.633);
--accent-foreground: oklch(0.836 0.029 133.224);
--destructive: oklch(0.681 0.2 41.419);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.791 0.207 136.066);
--chart-1: oklch(0.791 0.207 136.066);
--chart-2: oklch(0.244 0.011 133.316);
--chart-3: oklch(0.306 0.027 133.633);
--chart-4: oklch(0.277 0.014 133.338);
--chart-5: oklch(0.799 0.214 136.232);
}