Mochi for shadcn/ui

Mochi is a shadcn/ui theme built around a light purple primary color (#f3e2f0) with light pink accents (#f3e2e8). The light mode uses a neutral background (#ffffff). Dark mode keeps the light purple primary (#f3e2f0) on a neutral background (#080307).

Color palette

TokenLightDark
Background
#ffffffwhite
#080307black
Foreground
#12030fblack
#fdfcfdwhite
Card
#fcfcfcsnow
#0b040ablack
Card foreground
#0d020cblack
#ffffffwhite
Popover
#fcfcfcsnow
#0b040ablack
Popover foreground
#0d020cblack
#ffffffwhite
Primary
#f3e2f0lavender
#f3e2f0lavender
Primary foreground
#733069rebeccapurple
#733069rebeccapurple
Secondary
#ede2f3lavender
#ede2f3lavender
Secondary foreground
#5c3073darkslateblue
#5c3073darkslateblue
Muted
#ece7eelavender
#161118black
Muted foreground
#584860dimgray
#ae9fb7darkgray
Accent
#f3e2e8mistyrose
#f3e2e8mistyrose
Accent foreground
#733048brown
#733048brown
Destructive
#73210dmaroon
#ea603etomato
Destructive foreground
#f7c6balightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f3e2f0lavender
#f3e2f0lavender

Contrast

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

Light mode
Text on background20.08:1AAA
Text on card19.92:1AAA
Primary button7.20:1AAA
Secondary button7.90:1AAA
Muted text6.84:1AA
Accent7.51:1AAA
Destructive7.04:1AAA
Dark mode
Text on background20.03:1AAA
Text on card20.26:1AAA
Primary button7.20:1AAA
Secondary button7.90:1AAA
Muted text7.51:1AAA
Accent7.51:1AAA
Destructive6.24:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.136 0.042 332.863);
  --muted: oklch(0.933 0.012 314.151);
  --muted-foreground: oklch(0.428 0.043 313.668);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.121 0.037 332.191);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.121 0.037 332.191);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.931 0.026 330.604);
  --primary-foreground: oklch(0.424 0.12 333.599);
  --secondary: oklch(0.927 0.025 314.07);
  --secondary-foreground: oklch(0.397 0.117 312.269);
  --accent: oklch(0.929 0.02 354.18);
  --accent-foreground: oklch(0.409 0.098 0.368);
  --destructive: oklch(0.376 0.118 34.731);
  --destructive-foreground: oklch(0.868 0.059 34.386);
  --ring: oklch(0.931 0.026 330.604);
  --chart-1: oklch(0.931 0.026 330.604);
  --chart-2: oklch(0.927 0.025 314.07);
  --chart-3: oklch(0.929 0.02 354.18);
  --chart-4: oklch(0.954 0.016 314.129);
  --chart-5: oklch(0.93 0.028 330.63);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.021 331.219);
  --foreground: oklch(0.992 0.002 330.269);
  --muted: oklch(0.185 0.017 313.704);
  --muted-foreground: oklch(0.723 0.038 313.934);
  --popover: oklch(0.125 0.024 331.426);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.125 0.024 331.426);
  --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.931 0.026 330.604);
  --primary-foreground: oklch(0.424 0.12 333.599);
  --secondary: oklch(0.927 0.025 314.07);
  --secondary-foreground: oklch(0.397 0.117 312.269);
  --accent: oklch(0.929 0.02 354.18);
  --accent-foreground: oklch(0.409 0.098 0.368);
  --destructive: oklch(0.66 0.177 35.182);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.931 0.026 330.604);
  --chart-1: oklch(0.931 0.026 330.604);
  --chart-2: oklch(0.927 0.025 314.07);
  --chart-3: oklch(0.929 0.02 354.18);
  --chart-4: oklch(0.954 0.016 314.129);
  --chart-5: oklch(0.93 0.028 330.63);
}