Accordion is a shadcn/ui theme built around a muted deep purple primary color (#272027) with neutral gray accents (#d5d2d5). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep purple primary (#272027) on a neutral background (#030203).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030203black |
| Foreground | #080207black | #f8f7f8whitesmoke |
| Card | #ffffffwhite | #030203black |
| Card foreground | #080207black | #f8f7f8whitesmoke |
| Popover | #ffffffwhite | #030203black |
| Popover foreground | #080207black | #f8f7f8whitesmoke |
| Primary | #272027darkslategray | #272027darkslategray |
| Primary foreground | #c3b6c2silver | #c3b6c2silver |
| Secondary | #d5d2d5lightgrey | #272126darkslategray |
| Secondary foreground | #3c393cdarkslategray | #c2b7c1silver |
| Muted | #e3dee2gainsboro | #211c21black |
| Muted foreground | #6e596ddimgray | #a691a5darkgray |
| Accent | #d5d2d5lightgrey | #272126darkslategray |
| Accent foreground | #3c393cdarkslategray | #c2b7c1silver |
| Destructive | #db1006red | #ea1106red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #272027darkslategray | #272027darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.54:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 8.14:1 | AAA |
| Secondary button | 7.61:1 | AAA |
| Muted text | 4.77:1 | AA |
| Accent | 7.61:1 | AAA |
| Destructive | 5.14:1 | AA |
| Text on background | 19.39:1 | AAA |
| Text on card | 19.39:1 | AAA |
| Primary button | 8.14:1 | AAA |
| Secondary button | 8.15:1 | AAA |
| Muted text | 5.75:1 | AA |
| Accent | 8.15:1 | AAA |
| Destructive | 4.59:1 | AA |
Paste this into your globals.css to use Accordion in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.109 0.023 329.284);
--muted: oklch(0.906 0.008 328.156);
--muted-foreground: oklch(0.491 0.042 328.912);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.109 0.023 329.284);
--card: oklch(1 0 180);
--card-foreground: oklch(0.109 0.023 329.284);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.255 0.016 328.7);
--primary-foreground: oklch(0.791 0.022 328.356);
--secondary: oklch(0.868 0.004 328.116);
--secondary-foreground: oklch(0.349 0.007 328.281);
--accent: oklch(0.868 0.004 328.116);
--accent-foreground: oklch(0.349 0.007 328.281);
--destructive: oklch(0.563 0.226 29.55);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.255 0.016 328.7);
--chart-1: oklch(0.255 0.016 328.7);
--chart-2: oklch(0.868 0.004 328.116);
--chart-3: oklch(0.868 0.004 328.116);
--chart-4: oklch(0.891 0.004 328.105);
--chart-5: oklch(0.254 0.021 328.886);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.089 0.011 328.813);
--foreground: oklch(0.976 0.003 328.093);
--muted: oklch(0.235 0.011 328.552);
--muted-foreground: oklch(0.681 0.038 328.636);
--popover: oklch(0.089 0.011 328.813);
--popover-foreground: oklch(0.976 0.003 328.093);
--card: oklch(0.089 0.011 328.813);
--card-foreground: oklch(0.976 0.003 328.093);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.255 0.016 328.7);
--primary-foreground: oklch(0.791 0.022 328.356);
--secondary: oklch(0.256 0.013 328.575);
--secondary-foreground: oklch(0.792 0.018 328.298);
--accent: oklch(0.256 0.013 328.575);
--accent-foreground: oklch(0.792 0.018 328.298);
--destructive: oklch(0.592 0.237 29.539);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.255 0.016 328.7);
--chart-1: oklch(0.255 0.016 328.7);
--chart-2: oklch(0.256 0.013 328.575);
--chart-3: oklch(0.256 0.013 328.575);
--chart-4: oklch(0.287 0.015 328.601);
--chart-5: oklch(0.254 0.021 328.886);
}