Compassion is a shadcn/ui theme built around a vivid violet primary color (#b343fe) with vivid green accents (#8efe43). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#b343fe) on a neutral background (#060208).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #060208black |
| Foreground | #0f0416black | #f8f7f8whitesmoke |
| Card | #fcfcfcsnow | #09030cblack |
| Card foreground | #0c0311black | #faf9fasnow |
| Popover | #fcfcfcsnow | #09030cblack |
| Popover foreground | #0c0311black | #faf9fasnow |
| Primary | #b343femediumorchid | #b343femediumorchid |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #8efe43greenyellow | #8efe43greenyellow |
| Secondary foreground | #060f00black | #060f00black |
| Muted | #e2e7dfgainsboro | #1b2018black |
| Muted foreground | #4c5148darkslategray | #b2b7aedarkgray |
| Accent | #8efe43greenyellow | #8efe43greenyellow |
| Accent foreground | #060f00black | #060f00black |
| Destructive | #a73d0csaddlebrown | #e05210chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b343femediumorchid | #b343femediumorchid |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.01:1 | AAA |
| Text on card | 19.81:1 | AAA |
| Primary button | 4.06:1 | AA Large |
| Secondary button | 15.25:1 | AAA |
| Muted text | 6.47:1 | AA |
| Accent | 15.25:1 | AAA |
| Destructive | 6.34:1 | AA |
| Text on background | 19.25:1 | AAA |
| Text on card | 19.39:1 | AAA |
| Primary button | 4.06:1 | AA Large |
| Secondary button | 15.25:1 | AAA |
| Muted text | 8.12:1 | AAA |
| Accent | 15.25:1 | AAA |
| Destructive | 3.90:1 | AA Large |
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.138 0.044 311.334);
--muted: oklch(0.921 0.011 132.447);
--muted-foreground: oklch(0.427 0.016 132.653);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.127 0.039 312.567);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.127 0.039 312.567);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.626 0.262 307.694);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.896 0.238 135.803);
--secondary-foreground: oklch(0.154 0.041 130.615);
--accent: oklch(0.896 0.238 135.803);
--accent-foreground: oklch(0.154 0.041 130.615);
--destructive: oklch(0.503 0.15 40.476);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.626 0.262 307.694);
--chart-1: oklch(0.626 0.262 307.694);
--chart-2: oklch(0.896 0.238 135.803);
--chart-3: oklch(0.896 0.238 135.803);
--chart-4: oklch(0.902 0.225 135.333);
--chart-5: oklch(0.626 0.268 307.476);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.103 0.023 314.206);
--foreground: oklch(0.976 0.002 312.341);
--muted: oklch(0.235 0.015 132.861);
--muted-foreground: oklch(0.773 0.014 132.497);
--popover: oklch(0.119 0.026 313.93);
--popover-foreground: oklch(0.984 0.001 312.347);
--card: oklch(0.119 0.026 313.93);
--card-foreground: oklch(0.984 0.001 312.347);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.626 0.262 307.694);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.896 0.238 135.803);
--secondary-foreground: oklch(0.154 0.041 130.615);
--accent: oklch(0.896 0.238 135.803);
--accent-foreground: oklch(0.154 0.041 130.615);
--destructive: oklch(0.623 0.19 39.985);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.626 0.262 307.694);
--chart-1: oklch(0.626 0.262 307.694);
--chart-2: oklch(0.896 0.238 135.803);
--chart-3: oklch(0.896 0.238 135.803);
--chart-4: oklch(0.902 0.225 135.333);
--chart-5: oklch(0.626 0.268 307.476);
}