Tan is a shadcn/ui theme built around a near-black primary color (#0d0c0d) with neutral gray accents (#cfcecf). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the near-black primary (#0d0c0d) on a purple-tinted background (#0a050a).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfcfdwhite | #0a050ablack |
| Foreground | #120311black | #faf5faghostwhite |
| Card | #fdfcfdwhite | #0a050ablack |
| Card foreground | #120311black | #faf5faghostwhite |
| Popover | #fdfcfdwhite | #0a050ablack |
| Popover foreground | #120311black | #faf5faghostwhite |
| Primary | #0d0c0dblack | #0d0c0dblack |
| Primary foreground | #a9a2a9darkgray | #a9a2a9darkgray |
| Secondary | #cfcecflightgrey | #241e23black |
| Secondary foreground | #363536darkslategray | #c0b5bfsilver |
| Muted | #f2edf2whitesmoke | #120d12black |
| Muted foreground | #525252darkslategray | #adadaddarkgray |
| Accent | #cfcecflightgrey | #241e23black |
| Accent foreground | #363536darkslategray | #c0b5bfsilver |
| Destructive | #b4420efirebrick | #e45411chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0d0c0dblack | #0d0c0dblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.56:1 | AAA |
| Text on card | 19.56:1 | AAA |
| Primary button | 7.82:1 | AAA |
| Secondary button | 7.78:1 | AAA |
| Muted text | 6.76:1 | AA |
| Accent | 7.78:1 | AAA |
| Destructive | 5.61:1 | AA |
| Text on background | 18.75:1 | AAA |
| Text on card | 18.75:1 | AAA |
| Primary button | 7.82:1 | AAA |
| Secondary button | 8.22:1 | AAA |
| Muted text | 8.58:1 | AAA |
| Accent | 8.22:1 | AAA |
| Destructive | 3.77:1 | AA Large |
Paste this into your globals.css to use Tan in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.003 327.573);
--foreground: oklch(0.136 0.045 329.963);
--muted: oklch(0.952 0.008 327.633);
--muted-foreground: oklch(0.437 0 180);
--popover: oklch(0.992 0.003 327.573);
--popover-foreground: oklch(0.136 0.045 329.963);
--card: oklch(0.992 0.003 327.573);
--card-foreground: oklch(0.136 0.045 329.963);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.157 0.003 327.708);
--primary-foreground: oklch(0.721 0.012 327.715);
--secondary: oklch(0.853 0.002 327.565);
--secondary-foreground: oklch(0.33 0.002 327.614);
--accent: oklch(0.853 0.002 327.565);
--accent-foreground: oklch(0.33 0.002 327.614);
--destructive: oklch(0.532 0.159 40.487);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.157 0.003 327.708);
--chart-1: oklch(0.157 0.003 327.708);
--chart-2: oklch(0.853 0.002 327.565);
--chart-3: oklch(0.853 0.002 327.565);
--chart-4: oklch(0.876 0.001 327.561);
--chart-5: oklch(0.157 0.005 327.829);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.128 0.015 328.302);
--foreground: oklch(0.975 0.009 327.636);
--muted: oklch(0.167 0.013 328.29);
--muted-foreground: oklch(0.749 0 158.199);
--popover: oklch(0.128 0.015 328.302);
--popover-foreground: oklch(0.975 0.009 327.636);
--card: oklch(0.128 0.015 328.302);
--card-foreground: oklch(0.975 0.009 327.636);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.157 0.003 327.708);
--primary-foreground: oklch(0.721 0.012 327.715);
--secondary: oklch(0.245 0.012 328.022);
--secondary-foreground: oklch(0.784 0.019 327.78);
--accent: oklch(0.245 0.012 328.022);
--accent-foreground: oklch(0.784 0.019 327.78);
--destructive: oklch(0.631 0.191 40.119);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.157 0.003 327.708);
--chart-1: oklch(0.157 0.003 327.708);
--chart-2: oklch(0.245 0.012 328.022);
--chart-3: oklch(0.245 0.012 328.022);
--chart-4: oklch(0.276 0.015 328.049);
--chart-5: oklch(0.157 0.005 327.829);
}