Collapse is a shadcn/ui theme built around an indigo primary color (#5c54d4) with muted light indigo accents (#e0dfe7). The light mode uses a neutral background (#ffffff). Dark mode keeps the indigo primary (#5c54d4) on an indigo-tinted background (#05050a).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #05050ablack |
| Foreground | #010104black | #ffffffwhite |
| Card | #ffffffwhite | #05050ablack |
| Card foreground | #010104black | #ffffffwhite |
| Popover | #ffffffwhite | #05050ablack |
| Popover foreground | #010104black | #ffffffwhite |
| Primary | #5c54d4slateblue | #5c54d4slateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #e0dfe7gainsboro | #2e2d2edarkslategray |
| Secondary foreground | #414054darkslategray | #c6c6c7silver |
| Muted | #e3e3e8gainsboro | #17171cblack |
| Muted foreground | #555464dimgray | #9c9babdarkgray |
| Accent | #e0dfe7gainsboro | #2e2d2edarkslategray |
| Accent foreground | #414054darkslategray | #c6c6c7silver |
| Destructive | #7d320csaddlebrown | #e96320chocolate |
| Destructive foreground | #f9d5c3peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5c54d4slateblue | #5c54d4slateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.84:1 | AAA |
| Text on card | 20.84:1 | AAA |
| Primary button | 5.72:1 | AA |
| Secondary button | 7.60:1 | AAA |
| Muted text | 5.77:1 | AA |
| Accent | 7.60:1 | AAA |
| Destructive | 6.55:1 | AA |
| Text on background | 20.32:1 | AAA |
| Text on card | 20.32:1 | AAA |
| Primary button | 5.72:1 | AA |
| Secondary button | 8.01:1 | AAA |
| Muted text | 6.55:1 | AA |
| Accent | 8.01:1 | AAA |
| Destructive | 6.27:1 | AA |
Paste this into your globals.css to use Collapse in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.074 0.018 285.597);
--muted: oklch(0.917 0.008 289.324);
--muted-foreground: oklch(0.451 0.027 288.333);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.074 0.018 285.597);
--card: oklch(1 0 180);
--card-foreground: oklch(0.074 0.018 285.597);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.527 0.191 280.597);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.906 0.011 289.258);
--secondary-foreground: oklch(0.38 0.035 287.657);
--accent: oklch(0.906 0.011 289.258);
--accent-foreground: oklch(0.38 0.035 287.657);
--destructive: oklch(0.418 0.115 42.93);
--destructive-foreground: oklch(0.898 0.048 48.169);
--ring: oklch(0.527 0.191 280.597);
--chart-1: oklch(0.527 0.191 280.597);
--chart-2: oklch(0.906 0.011 289.258);
--chart-3: oklch(0.906 0.011 289.258);
--chart-4: oklch(0.932 0.008 289.324);
--chart-5: oklch(0.522 0.199 279.933);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.119 0.014 287.758);
--foreground: oklch(1 0 180);
--muted: oklch(0.206 0.011 288.447);
--muted-foreground: oklch(0.696 0.024 288.823);
--popover: oklch(0.119 0.014 287.758);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.119 0.014 287.758);
--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.527 0.191 280.597);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.299 0.002 289.376);
--secondary-foreground: oklch(0.828 0.002 289.443);
--accent: oklch(0.299 0.002 289.376);
--accent-foreground: oklch(0.828 0.002 289.443);
--destructive: oklch(0.66 0.182 42.872);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.527 0.191 280.597);
--chart-1: oklch(0.527 0.191 280.597);
--chart-2: oklch(0.299 0.002 289.376);
--chart-3: oklch(0.299 0.002 289.376);
--chart-4: oklch(0.329 0.002 289.372);
--chart-5: oklch(0.522 0.199 279.933);
}