Tofu for shadcn/ui

Tofu is a shadcn/ui theme built around a muted orange primary color (#88714e) with muted green accents (#82884e). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted orange primary (#88714e) on a neutral background (#030302).

Color palette

TokenLightDark
Background
#ffffffwhite
#030302black
Foreground
#150e05black
#ffffffwhite
Card
#ffffffwhite
#030302black
Card foreground
#150e05black
#ffffffwhite
Popover
#ffffffwhite
#030302black
Popover foreground
#150e05black
#ffffffwhite
Primary
#88714edimgray
#88714edimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#88544esienna
#88544esienna
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eee3e2mistyrose
#1d1211black
Muted foreground
#504949darkslategray
#b6afafdarkgray
Accent
#82884edimgray
#82884edimgray
Accent foreground
#000000black
#000000black
Destructive
#bc3306firebrick
#f8470dorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#88714edimgray
#88714edimgray

Contrast

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

Light mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button4.65:1AA
Secondary button6.13:1AA
Muted text7.00:1AAA
Accent5.58:1AA
Destructive5.80:1AA
Dark mode
Text on background20.65:1AAA
Text on card20.65:1AAA
Primary button4.65:1AA
Secondary button6.13:1AA
Muted text8.48:1AAA
Accent5.58:1AA
Destructive3.56:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.171 0.023 79.348);
  --muted: oklch(0.925 0.012 25.098);
  --muted-foreground: oklch(0.414 0.009 25.188);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.171 0.023 79.348);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.171 0.023 79.348);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.562 0.057 77.286);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.503 0.071 26.726);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.608 0.08 113.461);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.528 0.18 35.551);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.562 0.057 77.286);
  --chart-1: oklch(0.562 0.057 77.286);
  --chart-2: oklch(0.503 0.071 26.726);
  --chart-3: oklch(0.608 0.08 113.461);
  --chart-4: oklch(0.528 0.075 26.745);
  --chart-5: oklch(0.566 0.063 77.065);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.006 82.472);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.197 0.018 26.011);
  --muted-foreground: oklch(0.761 0.008 25.077);
  --popover: oklch(0.095 0.006 82.472);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.095 0.006 82.472);
  --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.562 0.057 77.286);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.503 0.071 26.726);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.608 0.08 113.461);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.65 0.22 35.582);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.562 0.057 77.286);
  --chart-1: oklch(0.562 0.057 77.286);
  --chart-2: oklch(0.503 0.071 26.726);
  --chart-3: oklch(0.608 0.08 113.461);
  --chart-4: oklch(0.528 0.075 26.745);
  --chart-5: oklch(0.566 0.063 77.065);
}