Basil for shadcn/ui

Basil is a shadcn/ui theme built around a muted light green primary color (#c5d8c7) with muted light red accents (#d8c7c5). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light green primary (#c5d8c7) on a green-tinted background (#040b05).

Color palette

TokenLightDark
Background
#ffffffwhite
#040b05black
Foreground
#061307black
#f8fcf9mintcream
Card
#fcfcfcsnow
#050f06black
Card foreground
#051006black
#fcfdfcwhite
Popover
#fcfcfcsnow
#050f06black
Popover foreground
#051006black
#fcfdfcwhite
Primary
#c5d8c7lightgrey
#c5d8c7lightgrey
Primary foreground
#2b402ddarkslategray
#2b402ddarkslategray
Secondary
#c7c5d8thistle
#c7c5d8thistle
Secondary foreground
#2d2b40darkslategray
#2d2b40darkslategray
Muted
#e0deedlavender
#141221black
Muted foreground
#4f4f4fdarkslategray
#b0b0b0darkgray
Accent
#d8c7c5lightgrey
#d8c7c5lightgrey
Accent foreground
#402d2bdarkslategray
#402d2bdarkslategray
Destructive
#db2206firebrick
#f92b0borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c5d8c7lightgrey
#c5d8c7lightgrey

Contrast

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

Light mode
Text on background19.02:1AAA
Text on card18.96:1AAA
Primary button7.47:1AAA
Secondary button8.12:1AAA
Muted text6.18:1AA
Accent7.92:1AAA
Destructive4.95:1AA
Dark mode
Text on background19.19:1AAA
Text on card19.08:1AAA
Primary button7.47:1AAA
Secondary button8.12:1AAA
Muted text8.49:1AAA
Accent7.92:1AAA
Destructive3.91:1AA Large

CSS variables

Paste this into your globals.css to use Basil in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.171 0.032 146.72);
  --muted: oklch(0.907 0.019 290.609);
  --muted-foreground: oklch(0.428 0 180);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.156 0.027 147.098);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.156 0.027 147.098);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.863 0.03 148.199);
  --primary-foreground: oklch(0.347 0.041 147.177);
  --secondary: oklch(0.832 0.026 290.428);
  --secondary-foreground: oklch(0.302 0.036 288.591);
  --accent: oklch(0.843 0.019 25.186);
  --accent-foreground: oklch(0.319 0.027 25.921);
  --destructive: oklch(0.571 0.219 31.1);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.863 0.03 148.199);
  --chart-1: oklch(0.863 0.03 148.199);
  --chart-2: oklch(0.832 0.026 290.428);
  --chart-3: oklch(0.843 0.019 25.186);
  --chart-4: oklch(0.859 0.021 290.542);
  --chart-5: oklch(0.865 0.035 148.136);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.022 147.462);
  --foreground: oklch(0.986 0.005 148.533);
  --muted: oklch(0.193 0.029 287.992);
  --muted-foreground: oklch(0.757 0 180);
  --popover: oklch(0.155 0.026 147.185);
  --popover-foreground: oklch(0.993 0.003 148.563);
  --card: oklch(0.155 0.026 147.185);
  --card-foreground: oklch(0.993 0.003 148.563);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.863 0.03 148.199);
  --primary-foreground: oklch(0.347 0.041 147.177);
  --secondary: oklch(0.832 0.026 290.428);
  --secondary-foreground: oklch(0.302 0.036 288.591);
  --accent: oklch(0.843 0.019 25.186);
  --accent-foreground: oklch(0.319 0.027 25.921);
  --destructive: oklch(0.631 0.239 31.174);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.863 0.03 148.199);
  --chart-1: oklch(0.863 0.03 148.199);
  --chart-2: oklch(0.832 0.026 290.428);
  --chart-3: oklch(0.843 0.019 25.186);
  --chart-4: oklch(0.859 0.021 290.542);
  --chart-5: oklch(0.865 0.035 148.136);
}