Accordion is a shadcn/ui theme built around a muted light green primary color (#cfdcc7) with muted light violet accents (#d4c7dc). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light green primary (#cfdcc7) on a neutral background (#020401).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020401black |
| Foreground | #0b1505black | #fafbf8snow |
| Card | #ffffffwhite | #020401black |
| Card foreground | #0b1505black | #fafbf8snow |
| Popover | #ffffffwhite | #020401black |
| Popover foreground | #0b1505black | #fafbf8snow |
| Primary | #cfdcc7lightgrey | #cfdcc7lightgrey |
| Primary foreground | #35452bdarkslategray | #35452bdarkslategray |
| Secondary | #d4c7dcthistle | #d4c7dcthistle |
| Secondary foreground | #3b2b45darkslategray | #3b2b45darkslategray |
| Muted | #f1eaf5whitesmoke | #110a15black |
| Muted foreground | #574861dimgray | #ae9eb7darkgray |
| Accent | #d4c7dcthistle | #d4c7dcthistle |
| Accent foreground | #3b2b45darkslategray | #3b2b45darkslategray |
| Destructive | #d30d0dfirebrick | #f00f0fred |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #cfdcc7lightgrey | #cfdcc7lightgrey |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.68:1 | AAA |
| Text on card | 18.68:1 | AAA |
| Primary button | 7.19:1 | AAA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 7.12:1 | AAA |
| Accent | 8.00:1 | AAA |
| Destructive | 5.47:1 | AA |
| Text on background | 19.81:1 | AAA |
| Text on card | 19.81:1 | AAA |
| Primary button | 7.19:1 | AAA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 7.78:1 | AAA |
| Accent | 8.00:1 | AAA |
| Destructive | 4.40:1 | AA Large |
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.179 0.035 133.577);
--muted: oklch(0.946 0.016 312.868);
--muted-foreground: oklch(0.426 0.045 312.259);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.179 0.035 133.577);
--card: oklch(1 0 180);
--card-foreground: oklch(0.179 0.035 133.577);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.878 0.032 133.239);
--primary-foreground: oklch(0.369 0.047 133.982);
--secondary: oklch(0.845 0.032 312.727);
--secondary-foreground: oklch(0.32 0.049 311.911);
--accent: oklch(0.845 0.032 312.727);
--accent-foreground: oklch(0.32 0.049 311.911);
--destructive: oklch(0.548 0.22 28.723);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.878 0.032 133.239);
--chart-1: oklch(0.878 0.032 133.239);
--chart-2: oklch(0.845 0.032 312.727);
--chart-3: oklch(0.845 0.032 312.727);
--chart-4: oklch(0.871 0.027 312.778);
--chart-5: oklch(0.88 0.036 133.272);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.1 0.016 131.527);
--foreground: oklch(0.987 0.005 133.018);
--muted: oklch(0.159 0.025 311.884);
--muted-foreground: oklch(0.722 0.04 312.61);
--popover: oklch(0.1 0.016 131.527);
--popover-foreground: oklch(0.987 0.005 133.018);
--card: oklch(0.1 0.016 131.527);
--card-foreground: oklch(0.987 0.005 133.018);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.878 0.032 133.239);
--primary-foreground: oklch(0.369 0.047 133.982);
--secondary: oklch(0.845 0.032 312.727);
--secondary-foreground: oklch(0.32 0.049 311.911);
--accent: oklch(0.845 0.032 312.727);
--accent-foreground: oklch(0.32 0.049 311.911);
--destructive: oklch(0.603 0.242 28.785);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.878 0.032 133.239);
--chart-1: oklch(0.878 0.032 133.239);
--chart-2: oklch(0.845 0.032 312.727);
--chart-3: oklch(0.845 0.032 312.727);
--chart-4: oklch(0.871 0.027 312.778);
--chart-5: oklch(0.88 0.036 133.272);
}