Poppy is a shadcn/ui theme built around an indigo primary color (#8269d3) with neutral gray accents (#d3d2d5). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the indigo primary (#8269d3) on an indigo-tinted background (#070410).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfcfdwhite | #070410black |
| Foreground | #070410black | #f9f9fbghostwhite |
| Card | #fcfcfdwhite | #070410black |
| Card foreground | #070410black | #f9f9fbghostwhite |
| Popover | #fcfcfdwhite | #070410black |
| Popover foreground | #070410black | #f9f9fbghostwhite |
| Primary | #8269d3mediumpurple | #8269d3mediumpurple |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #d3d2d5lightgrey | #18161dblack |
| Secondary foreground | #39383ddarkslategray | #ada9bcdarkgray |
| Muted | #dad7e5gainsboro | #1d1a28black |
| Muted foreground | #43404fdarkslategray | #b3b0bfsilver |
| Accent | #d3d2d5lightgrey | #18161dblack |
| Accent foreground | #39383ddarkslategray | #ada9bcdarkgray |
| Destructive | #e60b00red | #fa0c00red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8269d3mediumpurple | #8269d3mediumpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.76:1 | AAA |
| Text on card | 19.76:1 | AAA |
| Primary button | 4.28:1 | AA Large |
| Secondary button | 7.71:1 | AAA |
| Muted text | 7.10:1 | AAA |
| Accent | 7.71:1 | AAA |
| Destructive | 4.77:1 | AA |
| Text on background | 19.28:1 | AAA |
| Text on card | 19.28:1 | AAA |
| Primary button | 4.28:1 | AA Large |
| Secondary button | 7.83:1 | AAA |
| Muted text | 8.00:1 | AAA |
| Accent | 7.83:1 | AAA |
| Destructive | 4.10:1 | AA Large |
Paste this into your globals.css to use Poppy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.002 297.04);
--foreground: oklch(0.123 0.03 295.217);
--muted: oklch(0.886 0.019 296.688);
--muted-foreground: oklch(0.38 0.027 295.788);
--popover: oklch(0.991 0.002 297.04);
--popover-foreground: oklch(0.123 0.03 295.217);
--card: oklch(0.991 0.002 297.04);
--card-foreground: oklch(0.123 0.03 295.217);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.594 0.158 291.609);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.865 0.005 296.979);
--secondary-foreground: oklch(0.345 0.008 296.651);
--accent: oklch(0.865 0.005 296.979);
--accent-foreground: oklch(0.345 0.008 296.651);
--destructive: oklch(0.582 0.236 29.68);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.594 0.158 291.609);
--chart-1: oklch(0.594 0.158 291.609);
--chart-2: oklch(0.865 0.005 296.979);
--chart-3: oklch(0.865 0.005 296.979);
--chart-4: oklch(0.889 0.004 297);
--chart-5: oklch(0.589 0.166 291.202);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.029 295.302);
--foreground: oklch(0.983 0.002 297.034);
--muted: oklch(0.229 0.027 294.889);
--muted-foreground: oklch(0.764 0.023 296.548);
--popover: oklch(0.124 0.029 295.302);
--popover-foreground: oklch(0.983 0.002 297.034);
--card: oklch(0.124 0.029 295.302);
--card-foreground: oklch(0.983 0.002 297.034);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.594 0.158 291.609);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.206 0.013 295.911);
--secondary-foreground: oklch(0.744 0.029 296.381);
--accent: oklch(0.206 0.013 295.911);
--accent-foreground: oklch(0.744 0.029 296.381);
--destructive: oklch(0.621 0.252 29.638);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.594 0.158 291.609);
--chart-1: oklch(0.594 0.158 291.609);
--chart-2: oklch(0.206 0.013 295.911);
--chart-3: oklch(0.206 0.013 295.911);
--chart-4: oklch(0.236 0.017 295.797);
--chart-5: oklch(0.589 0.166 291.202);
}