Petition is a shadcn/ui theme built around a vivid yellow primary color (#b4a308) with vivid purple accents (#a308b4). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid yellow primary (#b4a308) on a neutral background (#070603).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #070603black |
| Foreground | #0d0c03black | #fbfbf9snow |
| Card | #ffffffwhite | #070603black |
| Card foreground | #0d0c03black | #fbfbf9snow |
| Popover | #ffffffwhite | #070603black |
| Popover foreground | #0d0c03black | #fbfbf9snow |
| Primary | #b4a308darkgoldenrod | #b4a308darkgoldenrod |
| Primary foreground | #000000black | #000000black |
| Secondary | #08b4a3lightseagreen | #08b4a3lightseagreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #edf7f6whitesmoke | #081211black |
| Muted foreground | #4d5b5adarkslategray | #a4b2b0darkgray |
| Accent | #a308b4darkviolet | #a308b4darkviolet |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #cf3307firebrick | #e73908orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b4a308darkgoldenrod | #b4a308darkgoldenrod |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.60:1 | AAA |
| Text on card | 19.60:1 | AAA |
| Primary button | 8.19:1 | AAA |
| Secondary button | 2.59:1 | Fail |
| Muted text | 6.51:1 | AA |
| Accent | 6.45:1 | AA |
| Destructive | 5.10:1 | AA |
| Text on background | 19.52:1 | AAA |
| Text on card | 19.52:1 | AAA |
| Primary button | 8.19:1 | AAA |
| Secondary button | 2.59:1 | Fail |
| Muted text | 8.68:1 | AAA |
| Accent | 6.45:1 | AA |
| Destructive | 4.20:1 | AA Large |
Paste this into your globals.css to use Petition in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.15 0.022 104.361);
--muted: oklch(0.969 0.011 189.827);
--muted-foreground: oklch(0.459 0.017 189.225);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.15 0.022 104.361);
--card: oklch(1 0 180);
--card-foreground: oklch(0.15 0.022 104.361);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.709 0.147 101.752);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.692 0.122 182.93);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.516 0.24 322.979);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.561 0.198 34.007);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.709 0.147 101.752);
--chart-1: oklch(0.709 0.147 101.752);
--chart-2: oklch(0.692 0.122 182.93);
--chart-3: oklch(0.516 0.24 322.979);
--chart-4: oklch(0.734 0.13 182.875);
--chart-5: oklch(0.716 0.149 101.629);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.01 103.326);
--foreground: oklch(0.987 0.002 101.324);
--muted: oklch(0.171 0.015 188.033);
--muted-foreground: oklch(0.751 0.015 189.614);
--popover: oklch(0.124 0.01 103.326);
--popover-foreground: oklch(0.987 0.002 101.324);
--card: oklch(0.124 0.01 103.326);
--card-foreground: oklch(0.987 0.002 101.324);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.709 0.147 101.752);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.692 0.122 182.93);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.516 0.24 322.979);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.609 0.216 33.875);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.709 0.147 101.752);
--chart-1: oklch(0.709 0.147 101.752);
--chart-2: oklch(0.692 0.122 182.93);
--chart-3: oklch(0.516 0.24 322.979);
--chart-4: oklch(0.734 0.13 182.875);
--chart-5: oklch(0.716 0.149 101.629);
}