Tofu for shadcn/ui

Tofu is a shadcn/ui theme built around a vivid deep orange primary color (#421600) with vivid deep yellow accents (#423700). The light mode uses a neutral background (#fcf9f8). Dark mode keeps the vivid deep orange primary (#421600) on a neutral background (#080403).

Color palette

TokenLightDark
Background
#fcf9f8snow
#080403black
Foreground
#120803black
#ffffffwhite
Card
#fcf9f8snow
#080403black
Card foreground
#120803black
#ffffffwhite
Popover
#fcf9f8snow
#080403black
Popover foreground
#120803black
#ffffffwhite
Primary
#421600maroon
#421600maroon
Primary foreground
#ffa375lightsalmon
#ffa375lightsalmon
Secondary
#42000bmaroon
#42000bmaroon
Secondary foreground
#ff758clightcoral
#ff758clightcoral
Muted
#e5e1e1gainsboro
#1e1a1bblack
Muted foreground
#656162dimgray
#9e9a9adarkgray
Accent
#423700darkolivegreen
#423700darkolivegreen
Accent foreground
#ffd70fgold
#ffd70fgold
Destructive
#ae2104firebrick
#e02a06orangered
Destructive foreground
#feeae6linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#421600maroon
#421600maroon

Contrast

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

Light mode
Text on background18.89:1AAA
Text on card18.89:1AAA
Primary button7.96:1AAA
Secondary button6.60:1AA
Muted text4.70:1AA
Accent8.39:1AAA
Destructive6.00:1AA
Dark mode
Text on background20.39:1AAA
Text on card20.39:1AAA
Primary button7.96:1AAA
Secondary button6.60:1AA
Muted text6.19:1AA
Accent8.39:1AAA
Destructive4.67:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.004 48.7);
  --foreground: oklch(0.146 0.023 56.369);
  --muted: oklch(0.913 0.005 5.59);
  --muted-foreground: oklch(0.498 0.005 5.716);
  --popover: oklch(0.984 0.004 48.7);
  --popover-foreground: oklch(0.146 0.023 56.369);
  --card: oklch(0.984 0.004 48.7);
  --card-foreground: oklch(0.146 0.023 56.369);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.267 0.076 45.084);
  --primary-foreground: oklch(0.798 0.125 46.969);
  --secondary: oklch(0.241 0.097 19.424);
  --secondary-foreground: oklch(0.732 0.168 11.867);
  --accent: oklch(0.339 0.07 96.606);
  --accent-foreground: oklch(0.887 0.18 95.176);
  --destructive: oklch(0.486 0.18 32.28);
  --destructive-foreground: oklch(0.953 0.023 31.103);
  --ring: oklch(0.267 0.076 45.084);
  --chart-1: oklch(0.267 0.076 45.084);
  --chart-2: oklch(0.241 0.097 19.424);
  --chart-3: oklch(0.339 0.07 96.606);
  --chart-4: oklch(0.276 0.111 20.92);
  --chart-5: oklch(0.268 0.078 45.155);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.115 0.011 55.939);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.222 0.007 6.277);
  --muted-foreground: oklch(0.688 0.005 5.627);
  --popover: oklch(0.115 0.011 55.939);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.115 0.011 55.939);
  --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.267 0.076 45.084);
  --primary-foreground: oklch(0.798 0.125 46.969);
  --secondary: oklch(0.241 0.097 19.424);
  --secondary-foreground: oklch(0.732 0.168 11.867);
  --accent: oklch(0.339 0.07 96.606);
  --accent-foreground: oklch(0.887 0.18 95.176);
  --destructive: oklch(0.585 0.219 31.998);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.267 0.076 45.084);
  --chart-1: oklch(0.267 0.076 45.084);
  --chart-2: oklch(0.241 0.097 19.424);
  --chart-3: oklch(0.339 0.07 96.606);
  --chart-4: oklch(0.276 0.111 20.92);
  --chart-5: oklch(0.268 0.078 45.155);
}