Slaw is a shadcn/ui theme built around a deep violet primary color (#2f135e) with deep green accents (#415e13). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#2f135e) on a violet-tinted background (#09060e).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #09060eblack |
| Foreground | #090411black | #ffffffwhite |
| Card | #ffffffwhite | #09060eblack |
| Card foreground | #090411black | #ffffffwhite |
| Popover | #ffffffwhite | #09060eblack |
| Popover foreground | #090411black | #ffffffwhite |
| Primary | #2f135emidnightblue | #2f135emidnightblue |
| Primary foreground | #cab2f0thistle | #cab2f0thistle |
| Secondary | #415e13darkolivegreen | #415e13darkolivegreen |
| Secondary foreground | #d8f0b2palegoldenrod | #d8f0b2palegoldenrod |
| Muted | #e9ece4beige | #181b13black |
| Muted foreground | #474c3ddarkslategray | #bcc2b3silver |
| Accent | #415e13darkolivegreen | #415e13darkolivegreen |
| Accent foreground | #d8f0b2palegoldenrod | #d8f0b2palegoldenrod |
| Destructive | #712504maroon | #e24a08orangered |
| Destructive foreground | #fcc4abpeachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2f135emidnightblue | #2f135emidnightblue |
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 | 8.11:1 | AAA |
| Secondary button | 6.03:1 | AA |
| Muted text | 7.41:1 | AAA |
| Accent | 6.03:1 | AA |
| Destructive | 6.91:1 | AA |
| Text on background | 20.07:1 | AAA |
| Text on card | 20.07:1 | AAA |
| Primary button | 8.11:1 | AAA |
| Secondary button | 6.03:1 | AA |
| Muted text | 9.56:1 | AAA |
| Accent | 6.03:1 | AA |
| Destructive | 4.02:1 | AA Large |
Paste this into your globals.css to use Slaw in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.124 0.034 302.929);
--muted: oklch(0.938 0.011 123.811);
--muted-foreground: oklch(0.408 0.026 124.593);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.124 0.034 302.929);
--card: oklch(1 0 180);
--card-foreground: oklch(0.124 0.034 302.929);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.28 0.124 294.415);
--primary-foreground: oklch(0.806 0.089 301.987);
--secondary: oklch(0.442 0.106 128.735);
--secondary-foreground: oklch(0.922 0.084 125.051);
--accent: oklch(0.442 0.106 128.735);
--accent-foreground: oklch(0.922 0.084 125.051);
--destructive: oklch(0.377 0.115 39.708);
--destructive-foreground: oklch(0.863 0.073 44.314);
--ring: oklch(0.28 0.124 294.415);
--chart-1: oklch(0.28 0.124 294.415);
--chart-2: oklch(0.442 0.106 128.735);
--chart-3: oklch(0.442 0.106 128.735);
--chart-4: oklch(0.483 0.117 128.856);
--chart-5: oklch(0.279 0.128 293.792);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.134 0.018 303.179);
--foreground: oklch(1 0 180);
--muted: oklch(0.215 0.015 124.734);
--muted-foreground: oklch(0.804 0.022 124.045);
--popover: oklch(0.134 0.018 303.179);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.134 0.018 303.179);
--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.28 0.124 294.415);
--primary-foreground: oklch(0.806 0.089 301.987);
--secondary: oklch(0.442 0.106 128.735);
--secondary-foreground: oklch(0.922 0.084 125.051);
--accent: oklch(0.442 0.106 128.735);
--accent-foreground: oklch(0.922 0.084 125.051);
--destructive: oklch(0.617 0.199 38.012);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.28 0.124 294.415);
--chart-1: oklch(0.28 0.124 294.415);
--chart-2: oklch(0.442 0.106 128.735);
--chart-3: oklch(0.442 0.106 128.735);
--chart-4: oklch(0.483 0.117 128.856);
--chart-5: oklch(0.279 0.128 293.792);
}