Cassava for shadcn/ui

Cassava is a shadcn/ui theme built around a deep violet primary color (#3a195d) with muted violet accents (#baa8cd). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#3a195d) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#fcfcfdwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#3a195dmidnightblue
#3a195dmidnightblue
Primary foreground
#d3bbedthistle
#d3bbedthistle
Secondary
#d1c9d9lightgrey
#262329darkslategray
Secondary foreground
#382e42darkslategray
#bfbac4silver
Muted
#e3dee7gainsboro
#1c1821black
Muted foreground
#4c4257darkslategray
#b2a8bddarkgray
Accent
#baa8cdsilver
#383041darkslategray
Accent foreground
#21182ablack
#d1cad8lightgrey
Destructive
#8f1504darkred
#f9472ftomato
Destructive foreground
#fdcfc9pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3a195dmidnightblue
#3a195dmidnightblue

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button8.23:1AAA
Secondary button7.96:1AAA
Muted text7.15:1AAA
Accent7.75:1AAA
Destructive6.54:1AA
Dark mode
Text on background20.48:1AAA
Text on card20.67:1AAA
Primary button8.23:1AAA
Secondary button8.12:1AAA
Muted text7.70:1AAA
Accent7.92:1AAA
Destructive3.53:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.908 0.013 307.623);
  --muted-foreground: oklch(0.397 0.038 306.676);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.3 0.116 301.938);
  --primary-foreground: oklch(0.827 0.074 306.745);
  --secondary: oklch(0.847 0.024 307.456);
  --secondary-foreground: oklch(0.321 0.037 306.412);
  --accent: oklch(0.758 0.056 306.928);
  --accent-foreground: oklch(0.229 0.036 305.918);
  --destructive: oklch(0.419 0.159 31.053);
  --destructive-foreground: oklch(0.892 0.054 26.957);
  --ring: oklch(0.3 0.116 301.938);
  --chart-1: oklch(0.3 0.116 301.938);
  --chart-2: oklch(0.847 0.024 307.456);
  --chart-3: oklch(0.758 0.056 306.928);
  --chart-4: oklch(0.873 0.02 307.521);
  --chart-5: oklch(0.299 0.12 301.498);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 307.775);
  --muted: oklch(0.216 0.018 306.792);
  --muted-foreground: oklch(0.746 0.032 307.284);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.3 0.116 301.938);
  --primary-foreground: oklch(0.827 0.074 306.745);
  --secondary: oklch(0.263 0.012 307.256);
  --secondary-foreground: oklch(0.796 0.015 307.567);
  --accent: oklch(0.324 0.031 306.659);
  --accent-foreground: oklch(0.849 0.02 307.512);
  --destructive: oklch(0.653 0.218 30.93);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.3 0.116 301.938);
  --chart-1: oklch(0.3 0.116 301.938);
  --chart-2: oklch(0.263 0.012 307.256);
  --chart-3: oklch(0.324 0.031 306.659);
  --chart-4: oklch(0.293 0.014 307.231);
  --chart-5: oklch(0.299 0.12 301.498);
}