Automatic is a shadcn/ui theme built around a muted deep yellow primary color (#2a2822) with muted deep violet accents (#28222a). The light mode uses a neutral background (#fefdfb). Dark mode keeps the muted deep yellow primary (#2a2822) on a yellow-tinted background (#100d04).
| Token | Light | Dark |
|---|---|---|
| Background | #fefdfbsnow | #100d04black |
| Foreground | #161104black | #fcfbf8snow |
| Card | #fefdfbsnow | #100d04black |
| Card foreground | #161104black | #fcfbf8snow |
| Popover | #fefdfbsnow | #100d04black |
| Popover foreground | #161104black | #fcfbf8snow |
| Primary | #2a2822darkslategray | #2a2822darkslategray |
| Primary foreground | #c6c2b9silver | #c6c2b9silver |
| Secondary | #222a28darkslategray | #222a28darkslategray |
| Secondary foreground | #b9c6c2silver | #b9c6c2silver |
| Muted | #eaf6f2honeydew | #091512black |
| Muted foreground | #4b635cdimgray | #9cb4aedarkgray |
| Accent | #28222adarkslategray | #28222adarkslategray |
| Accent foreground | #c2b9c6silver | #c2b9c6silver |
| Destructive | #7e300csaddlebrown | #eb6628chocolate |
| Destructive foreground | #f9d4c2peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2a2822darkslategray | #2a2822darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.51:1 | AAA |
| Text on card | 18.51:1 | AAA |
| Primary button | 8.28:1 | AAA |
| Secondary button | 8.32:1 | AAA |
| Muted text | 5.83:1 | AA |
| Accent | 8.13:1 | AAA |
| Destructive | 6.58:1 | AA |
| Text on background | 18.75:1 | AAA |
| Text on card | 18.75:1 | AAA |
| Primary button | 8.28:1 | AAA |
| Secondary button | 8.32:1 | AAA |
| Muted text | 8.46:1 | AAA |
| Accent | 8.13:1 | AAA |
| Destructive | 6.46:1 | AA |
Paste this into your globals.css to use Automatic in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.003 90.142);
--foreground: oklch(0.179 0.027 91.675);
--muted: oklch(0.962 0.013 178.393);
--muted-foreground: oklch(0.477 0.031 176.767);
--popover: oklch(0.994 0.003 90.142);
--popover-foreground: oklch(0.179 0.027 91.675);
--card: oklch(0.994 0.003 90.142);
--card-foreground: oklch(0.179 0.027 91.675);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.277 0.01 90.357);
--primary-foreground: oklch(0.815 0.013 90.24);
--secondary: oklch(0.277 0.011 177.549);
--secondary-foreground: oklch(0.815 0.015 178.255);
--accent: oklch(0.263 0.016 317.049);
--accent-foreground: oklch(0.797 0.02 317.131);
--destructive: oklch(0.416 0.117 41.549);
--destructive-foreground: oklch(0.896 0.049 46.324);
--ring: oklch(0.277 0.01 90.357);
--chart-1: oklch(0.277 0.01 90.357);
--chart-2: oklch(0.277 0.011 177.549);
--chart-3: oklch(0.263 0.016 317.049);
--chart-4: oklch(0.31 0.013 177.492);
--chart-5: oklch(0.28 0.013 90.396);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.16 0.021 92.703);
--foreground: oklch(0.988 0.004 90.151);
--muted: oklch(0.184 0.018 175.513);
--muted-foreground: oklch(0.751 0.028 177.659);
--popover: oklch(0.16 0.021 92.703);
--popover-foreground: oklch(0.988 0.004 90.151);
--card: oklch(0.16 0.021 92.703);
--card-foreground: oklch(0.988 0.004 90.151);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.277 0.01 90.357);
--primary-foreground: oklch(0.815 0.013 90.24);
--secondary: oklch(0.277 0.011 177.549);
--secondary-foreground: oklch(0.815 0.015 178.255);
--accent: oklch(0.263 0.016 317.049);
--accent-foreground: oklch(0.797 0.02 317.131);
--destructive: oklch(0.667 0.18 42.303);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.277 0.01 90.357);
--chart-1: oklch(0.277 0.01 90.357);
--chart-2: oklch(0.277 0.011 177.549);
--chart-3: oklch(0.263 0.016 317.049);
--chart-4: oklch(0.31 0.013 177.492);
--chart-5: oklch(0.28 0.013 90.396);
}