Basis is a shadcn/ui theme built around a neutral gray primary color (#615c5d) with neutral gray accents (#615d5c). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#615c5d) on a red-tinted background (#0c0405).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0c0405black |
| Foreground | #040102black | #faf5f6whitesmoke |
| Card | #ffffffwhite | #0c0405black |
| Card foreground | #040102black | #faf5f6whitesmoke |
| Popover | #ffffffwhite | #0c0405black |
| Popover foreground | #040102black | #faf5f6whitesmoke |
| Primary | #615c5ddimgray | #615c5ddimgray |
| Primary foreground | #f8f7f7whitesmoke | #f8f7f7whitesmoke |
| Secondary | #615c60dimgray | #615c60dimgray |
| Secondary foreground | #f8f7f7whitesmoke | #f8f7f7whitesmoke |
| Muted | #ddd5dagainsboro | #2a2228darkslategray |
| Muted foreground | #4f454cdarkslategray | #bab0b7silver |
| Accent | #615d5cdimgray | #615d5cdimgray |
| Accent foreground | #f8f7f7whitesmoke | #f8f7f7whitesmoke |
| Destructive | #6d0d08maroon | #f0463dtomato |
| Destructive foreground | #f9b2aelightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #615c5ddimgray | #615c5ddimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.78:1 | AAA |
| Text on card | 20.78:1 | AAA |
| Primary button | 6.17:1 | AA |
| Secondary button | 6.15:1 | AA |
| Muted text | 6.37:1 | AA |
| Accent | 6.07:1 | AA |
| Destructive | 7.00:1 | AAA |
| Text on background | 18.82:1 | AAA |
| Text on card | 18.82:1 | AAA |
| Primary button | 6.17:1 | AA |
| Secondary button | 6.15:1 | AA |
| Muted text | 7.32:1 | AAA |
| Accent | 6.07:1 | AA |
| Destructive | 3.71:1 | AA Large |
Paste this into your globals.css to use Basis in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.083 0.015 2.21);
--muted: oklch(0.88 0.011 335.42);
--muted-foreground: oklch(0.403 0.018 335.999);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.083 0.015 2.21);
--card: oklch(1 0 180);
--card-foreground: oklch(0.083 0.015 2.21);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.479 0.008 2.496);
--primary-foreground: oklch(0.977 0.001 2.081);
--secondary: oklch(0.48 0.01 335.551);
--secondary-foreground: oklch(0.977 0.001 335.203);
--accent: oklch(0.482 0.006 43.023);
--accent-foreground: oklch(0.977 0 43.127);
--destructive: oklch(0.345 0.129 29.109);
--destructive-foreground: oklch(0.829 0.083 22.404);
--ring: oklch(0.479 0.008 2.496);
--chart-1: oklch(0.479 0.008 2.496);
--chart-2: oklch(0.48 0.01 335.551);
--chart-3: oklch(0.482 0.006 43.023);
--chart-4: oklch(0.507 0.01 335.555);
--chart-5: oklch(0.475 0.015 2.934);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.121 0.019 2.319);
--foreground: oklch(0.974 0.006 2.225);
--muted: oklch(0.265 0.015 336.194);
--muted-foreground: oklch(0.768 0.016 335.557);
--popover: oklch(0.121 0.019 2.319);
--popover-foreground: oklch(0.974 0.006 2.225);
--card: oklch(0.121 0.019 2.319);
--card-foreground: oklch(0.974 0.006 2.225);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.479 0.008 2.496);
--primary-foreground: oklch(0.977 0.001 2.081);
--secondary: oklch(0.48 0.01 335.551);
--secondary-foreground: oklch(0.977 0.001 335.203);
--accent: oklch(0.482 0.006 43.023);
--accent-foreground: oklch(0.977 0 43.127);
--destructive: oklch(0.64 0.209 27.724);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.479 0.008 2.496);
--chart-1: oklch(0.479 0.008 2.496);
--chart-2: oklch(0.48 0.01 335.551);
--chart-3: oklch(0.482 0.006 43.023);
--chart-4: oklch(0.507 0.01 335.555);
--chart-5: oklch(0.475 0.015 2.934);
}