Compassionate is a shadcn/ui theme built around a yellow primary color (#a1a145) with indigo accents (#4545a1). The light mode uses a neutral background (#fefefb). Dark mode keeps the yellow primary (#a1a145) on a yellow-tinted background (#0c0c03).
| Token | Light | Dark |
|---|---|---|
| Background | #fefefbwhite | #0c0c03black |
| Foreground | #080802black | #fbfbf9snow |
| Card | #fefefbwhite | #0c0c03black |
| Card foreground | #080802black | #fbfbf9snow |
| Popover | #fefefbwhite | #0c0c03black |
| Popover foreground | #080802black | #fbfbf9snow |
| Primary | #a1a145yellowgreen | #a1a145yellowgreen |
| Primary foreground | #121208black | #121208black |
| Secondary | #4545a1darkslateblue | #4545a1darkslateblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #efeff5whitesmoke | #0a0a10black |
| Muted foreground | #4f4f4fdarkslategray | #b0b0b0darkgray |
| Accent | #4545a1darkslateblue | #4545a1darkslateblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #6a1b0cmaroon | #e63f1eorangered |
| Destructive foreground | #f6bdb1lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a1a145yellowgreen | #a1a145yellowgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.85:1 | AAA |
| Text on card | 19.85:1 | AAA |
| Primary button | 6.87:1 | AA |
| Secondary button | 8.04:1 | AAA |
| Muted text | 7.17:1 | AAA |
| Accent | 8.04:1 | AAA |
| Destructive | 7.23:1 | AAA |
| Text on background | 18.94:1 | AAA |
| Text on card | 18.94:1 | AAA |
| Primary button | 6.87:1 | AA |
| Secondary button | 8.04:1 | AAA |
| Muted text | 9.11:1 | AAA |
| Accent | 8.04:1 | AAA |
| Destructive | 4.11:1 | AA Large |
Paste this into your globals.css to use Compassionate in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.996 0.004 106.47);
--foreground: oklch(0.133 0.02 108.834);
--muted: oklch(0.955 0.008 286.251);
--muted-foreground: oklch(0.428 0 180);
--popover: oklch(0.996 0.004 106.47);
--popover-foreground: oklch(0.133 0.02 108.834);
--card: oklch(0.996 0.004 106.47);
--card-foreground: oklch(0.133 0.02 108.834);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.689 0.115 109.067);
--primary-foreground: oklch(0.178 0.02 108.249);
--secondary: oklch(0.443 0.145 278.695);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.443 0.145 278.695);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.351 0.114 33.128);
--destructive-foreground: oklch(0.846 0.069 31.431);
--ring: oklch(0.689 0.115 109.067);
--chart-1: oklch(0.689 0.115 109.067);
--chart-2: oklch(0.443 0.145 278.695);
--chart-3: oklch(0.443 0.145 278.695);
--chart-4: oklch(0.463 0.153 278.618);
--chart-5: oklch(0.699 0.121 109.159);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.151 0.021 108.668);
--foreground: oklch(0.987 0.002 106.439);
--muted: oklch(0.147 0.013 284.743);
--muted-foreground: oklch(0.757 0 180);
--popover: oklch(0.151 0.021 108.668);
--popover-foreground: oklch(0.987 0.002 106.439);
--card: oklch(0.151 0.021 108.668);
--card-foreground: oklch(0.987 0.002 106.439);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.689 0.115 109.067);
--primary-foreground: oklch(0.178 0.02 108.249);
--secondary: oklch(0.443 0.145 278.695);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.443 0.145 278.695);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.614 0.208 32.965);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.689 0.115 109.067);
--chart-1: oklch(0.689 0.115 109.067);
--chart-2: oklch(0.443 0.145 278.695);
--chart-3: oklch(0.443 0.145 278.695);
--chart-4: oklch(0.463 0.153 278.618);
--chart-5: oklch(0.699 0.121 109.159);
}