Sparse is a shadcn/ui theme built around a violet primary color (#b390ee) with purple accents (#e290ee). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the violet primary (#b390ee) on a neutral background (#050307).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfbfewhite | #050307black |
| Foreground | #06030dblack | #fcfcfdwhite |
| Card | #f9f7fcghostwhite | #07040bblack |
| Card foreground | #040209black | #ffffffwhite |
| Popover | #f9f7fcghostwhite | #07040bblack |
| Popover foreground | #040209black | #ffffffwhite |
| Primary | #b390eeplum | #b390eeplum |
| Primary foreground | #1f0a43midnightblue | #1f0a43midnightblue |
| Secondary | #909deecornflowerblue | #909deecornflowerblue |
| Secondary foreground | #0a1143midnightblue | #0a1143midnightblue |
| Muted | #eeeff6whitesmoke | #090a11black |
| Muted foreground | #404354darkslategray | #abaebfdarkgray |
| Accent | #e290eeviolet | #e290eeviolet |
| Accent foreground | #3b0a43midnightblue | #3b0a43midnightblue |
| Destructive | #dc0d09red | #f73936tomato |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b390eeplum | #b390eeplum |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.86:1 | AAA |
| Text on card | 19.45:1 | AAA |
| Primary button | 6.88:1 | AA |
| Secondary button | 7.00:1 | AAA |
| Muted text | 8.54:1 | AAA |
| Accent | 7.22:1 | AAA |
| Destructive | 5.10:1 | AA |
| Text on background | 20.04:1 | AAA |
| Text on card | 20.33:1 | AAA |
| Primary button | 6.88:1 | AA |
| Secondary button | 7.00:1 | AAA |
| Muted text | 8.98:1 | AAA |
| Accent | 7.22:1 | AAA |
| Destructive | 3.75:1 | AA Large |
Paste this into your globals.css to use Sparse in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.003 302.876);
--foreground: oklch(0.111 0.031 303.58);
--muted: oklch(0.954 0.01 279.19);
--muted-foreground: oklch(0.387 0.028 278.122);
--popover: oklch(0.98 0.007 302.822);
--popover-foreground: oklch(0.097 0.026 303.98);
--card: oklch(0.98 0.007 302.822);
--card-foreground: oklch(0.097 0.026 303.98);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.722 0.138 299.861);
--primary-foreground: oklch(0.22 0.098 293.217);
--secondary: oklch(0.718 0.12 276.278);
--secondary-foreground: oklch(0.213 0.092 269.657);
--accent: oklch(0.769 0.156 322.064);
--accent-foreground: oklch(0.263 0.107 321.919);
--destructive: oklch(0.565 0.228 29.08);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.722 0.138 299.861);
--chart-1: oklch(0.722 0.138 299.861);
--chart-2: oklch(0.718 0.12 276.278);
--chart-3: oklch(0.769 0.156 322.064);
--chart-4: oklch(0.752 0.104 276.864);
--chart-5: oklch(0.719 0.143 299.71);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.104 0.016 303.497);
--foreground: oklch(0.992 0.001 302.916);
--muted: oklch(0.146 0.015 277.185);
--muted-foreground: oklch(0.754 0.024 278.844);
--popover: oklch(0.12 0.018 303.448);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.12 0.018 303.448);
--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.722 0.138 299.861);
--primary-foreground: oklch(0.22 0.098 293.217);
--secondary: oklch(0.718 0.12 276.278);
--secondary-foreground: oklch(0.213 0.092 269.657);
--accent: oklch(0.769 0.156 322.064);
--accent-foreground: oklch(0.263 0.107 321.919);
--destructive: oklch(0.639 0.225 27.075);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.722 0.138 299.861);
--chart-1: oklch(0.722 0.138 299.861);
--chart-2: oklch(0.718 0.12 276.278);
--chart-3: oklch(0.769 0.156 322.064);
--chart-4: oklch(0.752 0.104 276.864);
--chart-5: oklch(0.719 0.143 299.71);
}