Sparse is a shadcn/ui theme built around a blue primary color (#4a6096) with indigo accents (#5b4a96). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#4a6096) on a blue-tinted background (#04060b).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #04060bblack |
| Foreground | #030711black | #fcfcfdwhite |
| Card | #ffffffwhite | #04060bblack |
| Card foreground | #030711black | #fcfcfdwhite |
| Popover | #ffffffwhite | #04060bblack |
| Popover foreground | #030711black | #fcfcfdwhite |
| Primary | #4a6096darkslateblue | #4a6096darkslateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #4a8696steelblue | #4a8696steelblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #d8e9eelavender | #112227black |
| Muted foreground | #454d4fdarkslategray | #b0b8basilver |
| Accent | #5b4a96darkslateblue | #5b4a96darkslateblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #6f0f06maroon | #f54838tomato |
| Destructive foreground | #fbb3adlightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4a6096darkslateblue | #4a6096darkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.14:1 | AAA |
| Text on card | 20.14:1 | AAA |
| Primary button | 6.18:1 | AA |
| Secondary button | 4.09:1 | AA Large |
| Muted text | 6.92:1 | AA |
| Accent | 7.33:1 | AAA |
| Destructive | 6.94:1 | AA |
| Text on background | 19.73:1 | AAA |
| Text on card | 19.73:1 | AAA |
| Primary button | 6.18:1 | AA |
| Secondary button | 4.09:1 | AA Large |
| Muted text | 8.11:1 | AAA |
| Accent | 7.33:1 | AAA |
| Destructive | 3.58:1 | AA Large |
Paste this into your globals.css to use Sparse in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.13 0.025 261.049);
--muted: oklch(0.923 0.019 216.116);
--muted-foreground: oklch(0.413 0.011 216.161);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.13 0.025 261.049);
--card: oklch(1 0 180);
--card-foreground: oklch(0.13 0.025 261.049);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.496 0.092 266.719);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.585 0.067 217.772);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.464 0.12 290.935);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.35 0.131 30.216);
--destructive-foreground: oklch(0.833 0.085 24.863);
--ring: oklch(0.496 0.092 266.719);
--chart-1: oklch(0.496 0.092 266.719);
--chart-2: oklch(0.585 0.067 217.772);
--chart-3: oklch(0.464 0.12 290.935);
--chart-4: oklch(0.614 0.071 217.793);
--chart-5: oklch(0.492 0.1 266.476);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.013 263.425);
--foreground: oklch(0.991 0.002 268.778);
--muted: oklch(0.24 0.024 217.319);
--muted-foreground: oklch(0.777 0.01 216.068);
--popover: oklch(0.124 0.013 263.425);
--popover-foreground: oklch(0.991 0.002 268.778);
--card: oklch(0.124 0.013 263.425);
--card-foreground: oklch(0.991 0.002 268.778);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.496 0.092 266.719);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.585 0.067 217.772);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.464 0.12 290.935);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.648 0.211 29.297);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.496 0.092 266.719);
--chart-1: oklch(0.496 0.092 266.719);
--chart-2: oklch(0.585 0.067 217.772);
--chart-3: oklch(0.464 0.12 290.935);
--chart-4: oklch(0.614 0.071 217.793);
--chart-5: oklch(0.492 0.1 266.476);
}