Basis for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background18.95:1AAA
Text on card18.95:1AAA
Primary button13.11:1AAA
Secondary button9.03:1AAA
Muted text5.90:1AA
Accent10.47:1AAA
Destructive6.79:1AA
Dark mode
Text on background19.23:1AAA
Text on card19.23:1AAA
Primary button13.11:1AAA
Secondary button9.03:1AAA
Muted text7.64:1AAA
Accent10.47:1AAA
Destructive7.33:1AAA

CSS variables

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);
}