Sorrowful is a shadcn/ui theme built around a purple primary color (#cc5dda) with muted light purple accents (#dfd7e0). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the purple primary (#cc5dda) on a purple-tinted background (#0d070e).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfdwhite | #0d070eblack |
| Foreground | #040104black | #ffffffwhite |
| Card | #fdfcfdwhite | #0d070eblack |
| Card foreground | #040104black | #ffffffwhite |
| Popover | #fdfcfdwhite | #0d070eblack |
| Popover foreground | #040104black | #ffffffwhite |
| Primary | #cc5ddamediumorchid | #cc5ddamediumorchid |
| Primary foreground | #040104black | #040104black |
| Secondary | #dfd7e0gainsboro | #2f2d2fdarkslategray |
| Secondary foreground | #493a4bdarkslategray | #c8c6c8silver |
| Muted | #f1e8f2lavender | #160d17black |
| Muted foreground | #614f64dimgray | #ae9bb0darkgray |
| Accent | #dfd7e0gainsboro | #2f2d2fdarkslategray |
| Accent foreground | #493a4bdarkslategray | #c8c6c8silver |
| Destructive | #862209darkred | #f04c24orangered |
| Destructive foreground | #fbd0c6peachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #cc5ddamediumorchid | #cc5ddamediumorchid |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.24:1 | AAA |
| Text on card | 20.24:1 | AAA |
| Primary button | 6.06:1 | AA |
| Secondary button | 7.48:1 | AAA |
| Muted text | 6.26:1 | AA |
| Accent | 7.48:1 | AAA |
| Destructive | 6.66:1 | AA |
| Text on background | 19.95:1 | AAA |
| Text on card | 19.95:1 | AAA |
| Primary button | 6.06:1 | AA |
| Secondary button | 8.05:1 | AAA |
| Muted text | 7.35:1 | AAA |
| Accent | 8.05:1 | AAA |
| Destructive | 3.64:1 | AA Large |
Paste this into your globals.css to use Sorrowful in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 322.123);
--foreground: oklch(0.083 0.027 324.524);
--muted: oklch(0.941 0.016 322.169);
--muted-foreground: oklch(0.453 0.042 322.412);
--popover: oklch(0.991 0.003 322.123);
--popover-foreground: oklch(0.083 0.027 324.524);
--card: oklch(0.991 0.003 322.123);
--card-foreground: oklch(0.083 0.027 324.524);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.661 0.206 322.853);
--primary-foreground: oklch(0.084 0.022 324.12);
--secondary: oklch(0.887 0.015 322.172);
--secondary-foreground: oklch(0.37 0.035 322.422);
--accent: oklch(0.887 0.015 322.172);
--accent-foreground: oklch(0.37 0.035 322.422);
--destructive: oklch(0.412 0.138 34.231);
--destructive-foreground: oklch(0.893 0.05 34.351);
--ring: oklch(0.661 0.206 322.853);
--chart-1: oklch(0.661 0.206 322.853);
--chart-2: oklch(0.887 0.015 322.172);
--chart-3: oklch(0.887 0.015 322.172);
--chart-4: oklch(0.912 0.012 322.158);
--chart-5: oklch(0.662 0.214 322.856);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.14 0.018 322.736);
--foreground: oklch(1 0 180);
--muted: oklch(0.175 0.024 322.536);
--muted-foreground: oklch(0.713 0.037 322.288);
--popover: oklch(0.14 0.018 322.736);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.14 0.018 322.736);
--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.661 0.206 322.853);
--primary-foreground: oklch(0.084 0.022 324.12);
--secondary: oklch(0.299 0.004 322.158);
--secondary-foreground: oklch(0.828 0.004 322.128);
--accent: oklch(0.299 0.004 322.158);
--accent-foreground: oklch(0.828 0.004 322.128);
--destructive: oklch(0.643 0.206 34.628);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.661 0.206 322.853);
--chart-1: oklch(0.661 0.206 322.853);
--chart-2: oklch(0.299 0.004 322.158);
--chart-3: oklch(0.299 0.004 322.158);
--chart-4: oklch(0.33 0.005 322.16);
--chart-5: oklch(0.662 0.214 322.856);
}