Automatic is a shadcn/ui theme built around a vivid indigo primary color (#7e84f1) with vivid violet accents (#b27ef1). The light mode uses a neutral background (#fbfcfd). Dark mode keeps the vivid indigo primary (#7e84f1) on an indigo-tinted background (#05050a).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfcfdwhite | #05050ablack |
| Foreground | #060713black | #f5f5fawhitesmoke |
| Card | #f8f8fcghostwhite | #07070eblack |
| Card foreground | #05060fblack | #f8f9fbghostwhite |
| Popover | #f8f8fcghostwhite | #07070eblack |
| Popover foreground | #05060fblack | #f8f9fbghostwhite |
| Primary | #7e84f1mediumslateblue | #7e84f1mediumslateblue |
| Primary foreground | #000000black | #000000black |
| Secondary | #7ebdf1skyblue | #7ebdf1skyblue |
| Secondary foreground | #062137midnightblue | #062137midnightblue |
| Muted | #ebedf0lavender | #0f1214black |
| Muted foreground | #49555fdarkslategray | #a0acb6darkgray |
| Accent | #b27ef1mediumpurple | #b27ef1mediumpurple |
| Accent foreground | #1c0637midnightblue | #1c0637midnightblue |
| Destructive | #980b0bdarkred | #ee1b1bcrimson |
| Destructive foreground | #fcd9d9mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7e84f1mediumslateblue | #7e84f1mediumslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.48:1 | AAA |
| Text on card | 19.08:1 | AAA |
| Primary button | 6.43:1 | AA |
| Secondary button | 8.17:1 | AAA |
| Muted text | 6.52:1 | AA |
| Accent | 6.31:1 | AA |
| Destructive | 6.73:1 | AA |
| Text on background | 18.70:1 | AAA |
| Text on card | 19.08:1 | AAA |
| Primary button | 6.43:1 | AA |
| Secondary button | 8.17:1 | AAA |
| Muted text | 8.11:1 | AAA |
| Accent | 6.31:1 | AA |
| Destructive | 4.36:1 | AA Large |
Paste this into your globals.css to use Automatic in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.002 283.928);
--foreground: oklch(0.135 0.028 279.13);
--muted: oklch(0.946 0.004 242.253);
--muted-foreground: oklch(0.444 0.022 242.872);
--popover: oklch(0.98 0.005 283.883);
--popover-foreground: oklch(0.125 0.024 279.23);
--card: oklch(0.98 0.005 283.883);
--card-foreground: oklch(0.125 0.024 279.23);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.658 0.161 278.715);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.776 0.099 244.249);
--secondary-foreground: oklch(0.241 0.054 246.955);
--accent: oklch(0.692 0.17 302.999);
--accent-foreground: oklch(0.198 0.089 298.382);
--destructive: oklch(0.431 0.17 28.376);
--destructive-foreground: oklch(0.915 0.039 17.89);
--ring: oklch(0.658 0.161 278.715);
--chart-1: oklch(0.658 0.161 278.715);
--chart-2: oklch(0.776 0.099 244.249);
--chart-3: oklch(0.692 0.17 302.999);
--chart-4: oklch(0.8 0.089 243.891);
--chart-5: oklch(0.654 0.167 278.443);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.119 0.014 281.079);
--foreground: oklch(0.972 0.006 283.868);
--muted: oklch(0.181 0.006 242.665);
--muted-foreground: oklch(0.738 0.02 242.547);
--popover: oklch(0.132 0.016 281.102);
--popover-foreground: oklch(0.981 0.004 283.903);
--card: oklch(0.132 0.016 281.102);
--card-foreground: oklch(0.981 0.004 283.903);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.658 0.161 278.715);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.776 0.099 244.249);
--secondary-foreground: oklch(0.241 0.054 246.955);
--accent: oklch(0.692 0.17 302.999);
--accent-foreground: oklch(0.198 0.089 298.382);
--destructive: oklch(0.604 0.236 28.237);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.658 0.161 278.715);
--chart-1: oklch(0.658 0.161 278.715);
--chart-2: oklch(0.776 0.099 244.249);
--chart-3: oklch(0.692 0.17 302.999);
--chart-4: oklch(0.8 0.089 243.891);
--chart-5: oklch(0.654 0.167 278.443);
}