Slate is a shadcn/ui theme built around a deep violet primary color (#2b153d) with neutral gray accents (#dbdbdb). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#2b153d) on a neutral background (#050307).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #050307black |
| Foreground | #0d0614black | #faf9fbghostwhite |
| Card | #ffffffwhite | #050307black |
| Card foreground | #0d0614black | #faf9fbghostwhite |
| Popover | #ffffffwhite | #050307black |
| Popover foreground | #0d0614black | #faf9fbghostwhite |
| Primary | #2b153dmidnightblue | #2b153dmidnightblue |
| Primary foreground | #c5a4e0plum | #c5a4e0plum |
| Secondary | #dbdbdbgainsboro | #211f23black |
| Secondary foreground | #424242darkslategray | #bbb5bfsilver |
| Muted | #e3dedegainsboro | #1f1c21black |
| Muted foreground | #504949darkslategray | #b3afb6darkgray |
| Accent | #dbdbdbgainsboro | #211f23black |
| Accent foreground | #424242darkslategray | #bbb5bfsilver |
| Destructive | #740902maroon | #f11404red |
| Destructive foreground | #feafaalightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2b153dmidnightblue | #2b153dmidnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.93:1 | AAA |
| Text on card | 19.93:1 | AAA |
| Primary button | 7.65:1 | AAA |
| Secondary button | 7.27:1 | AAA |
| Muted text | 6.60:1 | AA |
| Accent | 7.27:1 | AAA |
| Destructive | 6.70:1 | AA |
| Text on background | 19.57:1 | AAA |
| Text on card | 19.57:1 | AAA |
| Primary button | 7.65:1 | AAA |
| Secondary button | 8.15:1 | AAA |
| Muted text | 7.78:1 | AAA |
| Accent | 8.15:1 | AAA |
| Destructive | 4.33:1 | AA Large |
Paste this into your globals.css to use Slate in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.142 0.033 309.102);
--muted: oklch(0.905 0.005 17.243);
--muted-foreground: oklch(0.413 0.008 17.49);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.142 0.033 309.102);
--card: oklch(1 0 180);
--card-foreground: oklch(0.142 0.033 309.102);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.248 0.076 307.117);
--primary-foreground: oklch(0.768 0.091 309.328);
--secondary: oklch(0.892 0 180);
--secondary-foreground: oklch(0.38 0 180);
--accent: oklch(0.892 0 180);
--accent-foreground: oklch(0.38 0 180);
--destructive: oklch(0.355 0.139 30.333);
--destructive-foreground: oklch(0.828 0.093 23.805);
--ring: oklch(0.248 0.076 307.117);
--chart-1: oklch(0.248 0.076 307.117);
--chart-2: oklch(0.892 0 180);
--chart-3: oklch(0.892 0 180);
--chart-4: oklch(0.916 0 180);
--chart-5: oklch(0.247 0.08 306.842);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.106 0.018 311.784);
--foreground: oklch(0.984 0.002 310.416);
--muted: oklch(0.233 0.009 310.086);
--muted-foreground: oklch(0.76 0.009 310.323);
--popover: oklch(0.106 0.018 311.784);
--popover-foreground: oklch(0.984 0.002 310.416);
--card: oklch(0.106 0.018 311.784);
--card-foreground: oklch(0.984 0.002 310.416);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.248 0.076 307.117);
--primary-foreground: oklch(0.768 0.091 309.328);
--secondary: oklch(0.243 0.009 310.077);
--secondary-foreground: oklch(0.781 0.015 310.263);
--accent: oklch(0.243 0.009 310.077);
--accent-foreground: oklch(0.781 0.015 310.263);
--destructive: oklch(0.606 0.243 29.775);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.248 0.076 307.117);
--chart-1: oklch(0.248 0.076 307.117);
--chart-2: oklch(0.243 0.009 310.077);
--chart-3: oklch(0.243 0.009 310.077);
--chart-4: oklch(0.274 0.011 310.055);
--chart-5: oklch(0.247 0.08 306.842);
}