Compassion is a shadcn/ui theme built around a muted purple primary color (#804f87) with muted green accents (#57874f). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#804f87) on a neutral background (#040104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #040104black |
| Foreground | #0c020dblack | #fdfcfdwhite |
| Card | #ffffffwhite | #040104black |
| Card foreground | #0c020dblack | #fdfcfdwhite |
| Popover | #ffffffwhite | #040104black |
| Popover foreground | #0c020dblack | #fdfcfdwhite |
| Primary | #804f87rebeccapurple | #804f87rebeccapurple |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #57874fseagreen | #57874fseagreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #eaf2e9honeydew | #0f160dblack |
| Muted foreground | #454a45darkslategray | #b6bab5silver |
| Accent | #57874fseagreen | #57874fseagreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #9c270dbrown | #ef5a39tomato |
| Destructive foreground | #fce4demistyrose | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #804f87rebeccapurple | #804f87rebeccapurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.38:1 | AAA |
| Text on card | 20.38:1 | AAA |
| Primary button | 6.20:1 | AA |
| Secondary button | 4.21:1 | AA Large |
| Muted text | 7.90:1 | AAA |
| Accent | 4.21:1 | AA Large |
| Destructive | 6.40:1 | AA |
| Text on background | 20.28:1 | AAA |
| Text on card | 20.28:1 | AAA |
| Primary button | 6.20:1 | AA |
| Secondary button | 4.21:1 | AA Large |
| Muted text | 9.34:1 | AAA |
| Accent | 4.21:1 | AA Large |
| Destructive | 6.19:1 | AA |
Paste this into your globals.css to use Compassion in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.119 0.038 323.56);
--muted: oklch(0.952 0.014 141.55);
--muted-foreground: oklch(0.404 0.011 141.513);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.119 0.038 323.56);
--card: oklch(1 0 180);
--card-foreground: oklch(0.119 0.038 323.56);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.504 0.102 322.064);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.574 0.098 141.149);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.574 0.098 141.149);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.458 0.157 33.481);
--destructive-foreground: oklch(0.936 0.028 32.695);
--ring: oklch(0.504 0.102 322.064);
--chart-1: oklch(0.504 0.102 322.064);
--chart-2: oklch(0.574 0.098 141.149);
--chart-3: oklch(0.574 0.098 141.149);
--chart-4: oklch(0.603 0.104 141.147);
--chart-5: oklch(0.503 0.113 322.095);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.086 0.018 323.227);
--foreground: oklch(0.992 0.003 321.599);
--muted: oklch(0.19 0.021 141.285);
--muted-foreground: oklch(0.785 0.01 141.558);
--popover: oklch(0.086 0.018 323.227);
--popover-foreground: oklch(0.992 0.003 321.599);
--card: oklch(0.086 0.018 323.227);
--card-foreground: oklch(0.992 0.003 321.599);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.504 0.102 322.064);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.574 0.098 141.149);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.574 0.098 141.149);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.659 0.19 34.139);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.504 0.102 322.064);
--chart-1: oklch(0.504 0.102 322.064);
--chart-2: oklch(0.574 0.098 141.149);
--chart-3: oklch(0.574 0.098 141.149);
--chart-4: oklch(0.603 0.104 141.147);
--chart-5: oklch(0.503 0.113 322.095);
}