Key is a shadcn/ui theme built around a muted light purple primary color (#ebe5eb) with muted light cyan accents (#e5ebeb). The light mode uses a neutral background (#fcf8fb). Dark mode keeps the muted light purple primary (#ebe5eb) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf8fbsnow | #000000black |
| Foreground | #000000black | #fbf9fasnow |
| Card | #faf5faghostwhite | #030303black |
| Card foreground | #000000black | #fdfcfdwhite |
| Popover | #faf5faghostwhite | #030303black |
| Popover foreground | #000000black | #fdfcfdwhite |
| Primary | #ebe5eblavender | #ebe5eblavender |
| Primary foreground | #5b4359dimgray | #5b4359dimgray |
| Secondary | #ebebe5linen | #ebebe5linen |
| Secondary foreground | #1f2018black | #1f2018black |
| Muted | #dfe0d1gainsboro | #2c2e1fdarkslategray |
| Muted foreground | #4d4f40darkslategray | #bdbfb0silver |
| Accent | #e5ebeblavender | #e5ebeblavender |
| Accent foreground | #43595bdarkslategray | #43595bdarkslategray |
| Destructive | #b81f00firebrick | #ff330aorangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ebe5eblavender | #ebe5eblavender |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.96:1 | AAA |
| Text on card | 19.45:1 | AAA |
| Primary button | 7.06:1 | AAA |
| Secondary button | 13.76:1 | AAA |
| Muted text | 6.28:1 | AA |
| Accent | 6.16:1 | AA |
| Destructive | 6.52:1 | AA |
| Text on background | 20.03:1 | AAA |
| Text on card | 20.20:1 | AAA |
| Primary button | 7.06:1 | AAA |
| Secondary button | 13.76:1 | AAA |
| Muted text | 7.40:1 | AAA |
| Accent | 6.16:1 | AA |
| Destructive | 3.66:1 | AA Large |
Paste this into your globals.css to use Key in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.006 328.658);
--foreground: oklch(0 0 0);
--muted: oklch(0.903 0.021 111.438);
--muted-foreground: oklch(0.42 0.023 112.024);
--popover: oklch(0.975 0.009 328.692);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.975 0.009 328.692);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.928 0.011 328.724);
--primary-foreground: oklch(0.417 0.046 329.757);
--secondary: oklch(0.939 0.009 111.197);
--secondary-foreground: oklch(0.241 0.015 112.2);
--accent: oklch(0.935 0.007 204.935);
--accent-foreground: oklch(0.446 0.026 204.693);
--destructive: oklch(0.503 0.19 32.097);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.928 0.011 328.724);
--chart-1: oklch(0.928 0.011 328.724);
--chart-2: oklch(0.939 0.009 111.197);
--chart-3: oklch(0.935 0.007 204.935);
--chart-4: oklch(0.96 0.006 111.133);
--chart-5: oklch(0.927 0.013 328.75);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.984 0.002 328.617);
--muted: oklch(0.294 0.026 112.664);
--muted-foreground: oklch(0.799 0.02 111.475);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.992 0.001 328.605);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.992 0.001 328.605);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.928 0.011 328.724);
--primary-foreground: oklch(0.417 0.046 329.757);
--secondary: oklch(0.939 0.009 111.197);
--secondary-foreground: oklch(0.241 0.015 112.2);
--accent: oklch(0.935 0.007 204.935);
--accent-foreground: oklch(0.446 0.026 204.693);
--destructive: oklch(0.647 0.24 32.058);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.928 0.011 328.724);
--chart-1: oklch(0.928 0.011 328.724);
--chart-2: oklch(0.939 0.009 111.197);
--chart-3: oklch(0.935 0.007 204.935);
--chart-4: oklch(0.96 0.006 111.133);
--chart-5: oklch(0.927 0.013 328.75);
}