Basis is a shadcn/ui theme built around a near-white primary color (#fef8f6) with near-white accents (#f8f6fe). The light mode uses a neutral background (#fdf8f7). Dark mode keeps the near-white primary (#fef8f6) on a red-tinted background (#0b0604).
| Token | Light | Dark |
|---|---|---|
| Background | #fdf8f7snow | #0b0604black |
| Foreground | #100704black | #fbf9f9snow |
| Card | #fdf8f7snow | #0b0604black |
| Card foreground | #100704black | #fbf9f9snow |
| Popover | #fdf8f7snow | #0b0604black |
| Popover foreground | #100704black | #fbf9f9snow |
| Primary | #fef8f6snow | #fef8f6snow |
| Primary foreground | #531a09maroon | #531a09maroon |
| Secondary | #f6fef8mintcream | #f6fef8mintcream |
| Secondary foreground | #09531adarkgreen | #09531adarkgreen |
| Muted | #e0ebe3gainsboro | #141f17black |
| Muted foreground | #4e5a51darkslategray | #a5b1a8darkgray |
| Accent | #f8f6feghostwhite | #f8f6feghostwhite |
| Accent foreground | #3712afindigo | #3712afindigo |
| Destructive | #9f3a04saddlebrown | #f96f24tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fef8f6snow | #fef8f6snow |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.95:1 | AAA |
| Text on card | 18.95:1 | AAA |
| Primary button | 13.11:1 | AAA |
| Secondary button | 9.03:1 | AAA |
| Muted text | 5.90:1 | AA |
| Accent | 10.47:1 | AAA |
| Destructive | 6.79:1 | AA |
| Text on background | 19.23:1 | AAA |
| Text on card | 19.23:1 | AAA |
| Primary button | 13.11:1 | AAA |
| Secondary button | 9.03:1 | AAA |
| Muted text | 7.64:1 | AAA |
| Accent | 10.47:1 | AAA |
| Destructive | 7.33:1 | AAA |
Paste this into your globals.css to use Basis in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.005 37.717);
--foreground: oklch(0.142 0.018 43.008);
--muted: oklch(0.929 0.016 152.961);
--muted-foreground: oklch(0.455 0.021 152.474);
--popover: oklch(0.983 0.005 37.717);
--popover-foreground: oklch(0.142 0.018 43.008);
--card: oklch(0.983 0.005 37.717);
--card-foreground: oklch(0.142 0.018 43.008);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.983 0.007 37.706);
--primary-foreground: oklch(0.306 0.089 36.875);
--secondary: oklch(0.989 0.012 153.041);
--secondary-foreground: oklch(0.387 0.112 146.133);
--accent: oklch(0.976 0.011 296.874);
--accent-foreground: oklch(0.378 0.216 278.969);
--destructive: oklch(0.486 0.145 41.793);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.983 0.007 37.706);
--chart-1: oklch(0.983 0.007 37.706);
--chart-2: oklch(0.989 0.012 153.041);
--chart-3: oklch(0.976 0.011 296.874);
--chart-4: oklch(1.005 0.006 333.337);
--chart-5: oklch(0.982 0.008 37.705);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.128 0.014 43.786);
--foreground: oklch(0.984 0.002 37.732);
--muted: oklch(0.225 0.022 151.508);
--muted-foreground: oklch(0.748 0.018 152.835);
--popover: oklch(0.128 0.014 43.786);
--popover-foreground: oklch(0.984 0.002 37.732);
--card: oklch(0.128 0.014 43.786);
--card-foreground: oklch(0.984 0.002 37.732);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.983 0.007 37.706);
--primary-foreground: oklch(0.306 0.089 36.875);
--secondary: oklch(0.989 0.012 153.041);
--secondary-foreground: oklch(0.387 0.112 146.133);
--accent: oklch(0.976 0.011 296.874);
--accent-foreground: oklch(0.378 0.216 278.969);
--destructive: oklch(0.7 0.188 44.263);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.983 0.007 37.706);
--chart-1: oklch(0.983 0.007 37.706);
--chart-2: oklch(0.989 0.012 153.041);
--chart-3: oklch(0.976 0.011 296.874);
--chart-4: oklch(1.005 0.006 333.337);
--chart-5: oklch(0.982 0.008 37.705);
}