Discrete is a shadcn/ui theme built around a green primary color (#2a982a) with purple accents (#982a98). The light mode uses a neutral background (#fbfefb). Dark mode keeps the green primary (#2a982a) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefbwhite | #000000black |
| Foreground | #061406black | #fcfdfcwhite |
| Card | #fbfefbwhite | #000000black |
| Card foreground | #061406black | #fcfdfcwhite |
| Popover | #fbfefbwhite | #000000black |
| Popover foreground | #061406black | #fcfdfcwhite |
| Primary | #2a982aforestgreen | #2a982aforestgreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #982a98darkmagenta | #982a98darkmagenta |
| Secondary foreground | #fdf7fdsnow | #fdf7fdsnow |
| Muted | #e9cee9gainsboro | #311631darkslategray |
| Muted foreground | #646264dimgray | #9d9b9ddarkgray |
| Accent | #982a98darkmagenta | #982a98darkmagenta |
| Accent foreground | #fdf7fdsnow | #fdf7fdsnow |
| Destructive | #802400maroon | #ff4800orangered |
| Destructive foreground | #ffc8b3peachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2a982aforestgreen | #2a982aforestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.57:1 | AAA |
| Text on card | 18.57:1 | AAA |
| Primary button | 3.73:1 | AA Large |
| Secondary button | 6.38:1 | AA |
| Muted text | 4.16:1 | AA Large |
| Accent | 6.38:1 | AA |
| Destructive | 6.54:1 | AA |
| Text on background | 20.59:1 | AAA |
| Text on card | 20.59:1 | AAA |
| Primary button | 3.73:1 | AA Large |
| Secondary button | 6.38:1 | AA |
| Muted text | 5.88:1 | AA |
| Accent | 6.38:1 | AA |
| Destructive | 3.39:1 | AA Large |
Paste this into your globals.css to use Discrete in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.004 145.548);
--foreground: oklch(0.171 0.035 143.881);
--muted: oklch(0.882 0.046 325.957);
--muted-foreground: oklch(0.5 0.004 325.636);
--popover: oklch(0.993 0.004 145.548);
--popover-foreground: oklch(0.171 0.035 143.881);
--card: oklch(0.993 0.004 145.548);
--card-foreground: oklch(0.171 0.035 143.881);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.597 0.177 142.955);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.498 0.191 327.984);
--secondary-foreground: oklch(0.982 0.01 325.651);
--accent: oklch(0.498 0.191 327.984);
--accent-foreground: oklch(0.982 0.01 325.651);
--destructive: oklch(0.402 0.132 37.934);
--destructive-foreground: oklch(0.876 0.069 42.61);
--ring: oklch(0.597 0.177 142.955);
--chart-1: oklch(0.597 0.177 142.955);
--chart-2: oklch(0.498 0.191 327.984);
--chart-3: oklch(0.498 0.191 327.984);
--chart-4: oklch(0.526 0.203 327.994);
--chart-5: oklch(0.604 0.183 142.889);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.993 0.002 145.561);
--muted: oklch(0.252 0.06 327.176);
--muted-foreground: oklch(0.69 0.004 325.616);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.993 0.002 145.561);
--card: oklch(0 0 0);
--card-foreground: oklch(0.993 0.002 145.561);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.597 0.177 142.955);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.498 0.191 327.984);
--secondary-foreground: oklch(0.982 0.01 325.651);
--accent: oklch(0.498 0.191 327.984);
--accent-foreground: oklch(0.982 0.01 325.651);
--destructive: oklch(0.663 0.227 36.019);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.597 0.177 142.955);
--chart-1: oklch(0.597 0.177 142.955);
--chart-2: oklch(0.498 0.191 327.984);
--chart-3: oklch(0.498 0.191 327.984);
--chart-4: oklch(0.526 0.203 327.994);
--chart-5: oklch(0.604 0.183 142.889);
}