Mochi for shadcn/ui

Mochi is a shadcn/ui theme built around a muted indigo primary color (#5f5b71) with muted light indigo accents (#cccad8). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the muted indigo primary (#5f5b71) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#000000black
Foreground
#000000black
#fcfcfdwhite
Card
#f4f3fcghostwhite
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#f4f3fcghostwhite
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#5f5b71dimgray
#5f5b71dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cccad8lightgrey
#1c1c1cblack
Secondary foreground
#322f41darkslategray
#b5b5b5silver
Muted
#e6e5eblavender
#1a1414black
Muted foreground
#444054darkslategray
#bfababdarkgray
Accent
#cccad8lightgrey
#1c1c1cblack
Accent foreground
#322f41darkslategray
#b5b5b5silver
Destructive
#b44208firebrick
#db500achocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5f5b71dimgray
#5f5b71dimgray

Contrast

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

Light mode
Text on background19.68:1AAA
Text on card19.04:1AAA
Primary button6.54:1AA
Secondary button8.02:1AAA
Muted text7.97:1AAA
Accent8.02:1AAA
Destructive5.64:1AA
Dark mode
Text on background20.48:1AAA
Text on card20.67:1AAA
Primary button6.54:1AA
Secondary button8.30:1AAA
Muted text8.33:1AAA
Accent8.30:1AAA
Destructive4.06:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.008 293.907);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.925 0.007 293.916);
  --muted-foreground: oklch(0.384 0.033 292.434);
  --popover: oklch(0.967 0.012 293.824);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.967 0.012 293.824);
  --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.482 0.036 292.642);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.845 0.02 293.614);
  --secondary-foreground: oklch(0.317 0.032 292.114);
  --accent: oklch(0.845 0.02 293.614);
  --accent-foreground: oklch(0.317 0.032 292.114);
  --destructive: oklch(0.531 0.16 40.859);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.482 0.036 292.642);
  --chart-1: oklch(0.482 0.036 292.642);
  --chart-2: oklch(0.845 0.02 293.614);
  --chart-3: oklch(0.845 0.02 293.614);
  --chart-4: oklch(0.871 0.017 293.704);
  --chart-5: oklch(0.475 0.046 292.199);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 294.034);
  --muted: oklch(0.199 0.009 17.935);
  --muted-foreground: oklch(0.759 0.022 17.654);
  --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.482 0.036 292.642);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.227 0 164.055);
  --secondary-foreground: oklch(0.773 0 180);
  --accent: oklch(0.227 0 164.055);
  --accent-foreground: oklch(0.773 0 180);
  --destructive: oklch(0.613 0.187 40.48);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.482 0.036 292.642);
  --chart-1: oklch(0.482 0.036 292.642);
  --chart-2: oklch(0.227 0 164.055);
  --chart-3: oklch(0.227 0 164.055);
  --chart-4: oklch(0.259 0 167.471);
  --chart-5: oklch(0.475 0.046 292.199);
}