Key is a shadcn/ui theme built around a vivid green primary color (#9cf28d) with vivid green accents (#8df2b0). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#9cf28d) on a green-tinted background (#050b04).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #050b04black |
| Foreground | #030901black | #fcfdfcwhite |
| Card | #fcfcfcsnow | #070f05black |
| Card foreground | #010401black | #ffffffwhite |
| Popover | #fcfcfcsnow | #070f05black |
| Popover foreground | #010401black | #ffffffwhite |
| Primary | #9cf28dlightgreen | #9cf28dlightgreen |
| Primary foreground | #114408darkgreen | #114408darkgreen |
| Secondary | #cef28dkhaki | #cef28dkhaki |
| Secondary foreground | #2f4408darkgreen | #2f4408darkgreen |
| Muted | #dce3cegainsboro | #29311cdarkslategray |
| Muted foreground | #525a44darkolivegreen | #b3bba5darkgray |
| Accent | #8df2b0palegreen | #8df2b0palegreen |
| Accent foreground | #08441ddarkgreen | #08441ddarkgreen |
| Destructive | #8a2000darkred | #ff3f05orangered |
| Destructive foreground | #ffccbdpeachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #9cf28dlightgreen | #9cf28dlightgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.12:1 | AAA |
| Text on card | 20.16:1 | AAA |
| Primary button | 8.33:1 | AAA |
| Secondary button | 8.54:1 | AAA |
| Muted text | 5.49:1 | AA |
| Accent | 8.30:1 | AAA |
| Destructive | 6.40:1 | AA |
| Text on background | 19.46:1 | AAA |
| Text on card | 19.42:1 | AAA |
| Primary button | 8.33:1 | AAA |
| Secondary button | 8.54:1 | AAA |
| Muted text | 6.81:1 | AA |
| Accent | 8.30:1 | AAA |
| Destructive | 3.51:1 | AA Large |
Paste this into your globals.css to use Key in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.125 0.028 138.869);
--muted: oklch(0.906 0.03 122.732);
--muted-foreground: oklch(0.455 0.036 123.494);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.099 0.022 138.869);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.099 0.022 138.869);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.882 0.158 140.74);
--primary-foreground: oklch(0.341 0.103 141.063);
--secondary: oklch(0.912 0.133 124.728);
--secondary-foreground: oklch(0.358 0.087 127.772);
--accent: oklch(0.881 0.132 154.234);
--accent-foreground: oklch(0.342 0.089 149.651);
--destructive: oklch(0.417 0.146 35.186);
--destructive-foreground: oklch(0.886 0.062 37.592);
--ring: oklch(0.882 0.158 140.74);
--chart-1: oklch(0.882 0.158 140.74);
--chart-2: oklch(0.912 0.133 124.728);
--chart-3: oklch(0.881 0.132 154.234);
--chart-4: oklch(0.922 0.118 124.374);
--chart-5: oklch(0.885 0.163 140.736);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.141 0.023 139.549);
--foreground: oklch(0.993 0.001 141.063);
--muted: oklch(0.299 0.038 124.342);
--muted-foreground: oklch(0.78 0.032 122.86);
--popover: oklch(0.157 0.027 139.817);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.157 0.027 139.817);
--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.882 0.158 140.74);
--primary-foreground: oklch(0.341 0.103 141.063);
--secondary: oklch(0.912 0.133 124.728);
--secondary-foreground: oklch(0.358 0.087 127.772);
--accent: oklch(0.881 0.132 154.234);
--accent-foreground: oklch(0.342 0.089 149.651);
--destructive: oklch(0.656 0.233 34.148);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.882 0.158 140.74);
--chart-1: oklch(0.882 0.158 140.74);
--chart-2: oklch(0.912 0.133 124.728);
--chart-3: oklch(0.881 0.132 154.234);
--chart-4: oklch(0.922 0.118 124.374);
--chart-5: oklch(0.885 0.163 140.736);
}