Troop is a shadcn/ui theme built around a muted indigo primary color (#555388) with muted yellow accents (#868853). The light mode uses a neutral background (#f7f6fd). Dark mode keeps the muted indigo primary (#555388) on a neutral background (#030308).
| Token | Light | Dark |
|---|---|---|
| Background | #f7f6fdghostwhite | #030308black |
| Foreground | #010104black | #ffffffwhite |
| Card | #f2f2fdaliceblue | #04040bblack |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f2f2fdaliceblue | #04040bblack |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #555388darkslateblue | #555388darkslateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #868853gray | #868853gray |
| Secondary foreground | #000000black | #000000black |
| Muted | #efefe6linen | #191910black |
| Muted foreground | #474837darkslategray | #c7c8b7silver |
| Accent | #868853gray | #868853gray |
| Accent foreground | #000000black | #000000black |
| Destructive | #d10505red | #e50606red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #555388darkslateblue | #555388darkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.45:1 | AAA |
| Text on card | 18.92:1 | AAA |
| Primary button | 7.02:1 | AAA |
| Secondary button | 5.66:1 | AA |
| Muted text | 8.08:1 | AAA |
| Accent | 5.66:1 | AA |
| Destructive | 5.62:1 | AA |
| Text on background | 20.62:1 | AAA |
| Text on card | 20.44:1 | AAA |
| Primary button | 7.02:1 | AAA |
| Secondary button | 5.66:1 | AA |
| Muted text | 10.41:1 | AAA |
| Accent | 5.66:1 | AA |
| Destructive | 4.82:1 | AA |
Paste this into your globals.css to use Troop in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.977 0.009 287.765);
--foreground: oklch(0.07 0.022 281.799);
--muted: oklch(0.95 0.012 108.179);
--muted-foreground: oklch(0.396 0.027 109.138);
--popover: oklch(0.965 0.014 287.672);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.965 0.014 287.672);
--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.469 0.084 284.175);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.612 0.073 110.014);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.612 0.073 110.014);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.542 0.22 29.027);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.469 0.084 284.175);
--chart-1: oklch(0.469 0.084 284.175);
--chart-2: oklch(0.612 0.073 110.014);
--chart-3: oklch(0.612 0.073 110.014);
--chart-4: oklch(0.643 0.077 110.026);
--chart-5: oklch(0.461 0.095 283.542);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.098 0.018 284.629);
--foreground: oklch(1 0 180);
--muted: oklch(0.21 0.018 109.411);
--muted-foreground: oklch(0.826 0.023 108.437);
--popover: oklch(0.112 0.021 284.596);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.112 0.021 284.596);
--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.469 0.084 284.175);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.612 0.073 110.014);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.612 0.073 110.014);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.58 0.236 29.049);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.469 0.084 284.175);
--chart-1: oklch(0.469 0.084 284.175);
--chart-2: oklch(0.612 0.073 110.014);
--chart-3: oklch(0.612 0.073 110.014);
--chart-4: oklch(0.643 0.077 110.026);
--chart-5: oklch(0.461 0.095 283.542);
}