Mocha for shadcn/ui

Mocha is a shadcn/ui theme built around a light pink primary color (#e2c1cc) with light teal accents (#c1e2d6). The light mode uses a neutral background (#ffffff). Dark mode keeps the light pink primary (#e2c1cc) on a pink-tinted background (#0c0306).

Color palette

TokenLightDark
Background
#ffffffwhite
#0c0306black
Foreground
#090104black
#fbf9fasnow
Card
#fcfcfcsnow
#100408black
Card foreground
#050102black
#fdfcfcsnow
Popover
#ffffffwhite
#0c0306black
Popover foreground
#090104black
#fbf9fasnow
Primary
#e2c1ccthistle
#e2c1ccthistle
Primary foreground
#4c2432darkslategray
#4c2432darkslategray
Secondary
#c1e2d6powderblue
#c1e2d6powderblue
Secondary foreground
#244c3edarkslategray
#244c3edarkslategray
Muted
#eff5f3whitesmoke
#0a100eblack
Muted foreground
#4c615adimgray
#9eb3abdarkgray
Accent
#c1e2d6powderblue
#c1e2d6powderblue
Accent foreground
#244c3edarkslategray
#244c3edarkslategray
Destructive
#920e01darkred
#fd2512orangered
Destructive foreground
#feccc7pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e2c1ccthistle
#e2c1ccthistle

Contrast

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

Light mode
Text on background20.63:1AAA
Text on card20.31:1AAA
Primary button7.90:1AAA
Secondary button6.91:1AA
Muted text6.01:1AA
Accent6.91:1AA
Destructive6.40:1AA
Dark mode
Text on background19.40:1AAA
Text on card19.63:1AAA
Primary button7.90:1AAA
Secondary button6.91:1AA
Muted text8.70:1AAA
Accent6.91:1AA
Destructive3.86:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.1 0.029 352.975);
  --muted: oklch(0.966 0.006 173.378);
  --muted-foreground: oklch(0.473 0.028 171.738);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.1 0.029 352.975);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.08 0.023 352.975);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.841 0.04 354.916);
  --primary-foreground: oklch(0.32 0.063 359.056);
  --secondary: oklch(0.884 0.038 172.254);
  --secondary-foreground: oklch(0.383 0.052 168.512);
  --accent: oklch(0.884 0.038 172.254);
  --accent-foreground: oklch(0.383 0.052 168.512);
  --destructive: oklch(0.421 0.165 30.429);
  --destructive-foreground: oklch(0.888 0.058 24.335);
  --ring: oklch(0.841 0.04 354.916);
  --chart-1: oklch(0.841 0.04 354.916);
  --chart-2: oklch(0.884 0.038 172.254);
  --chart-3: oklch(0.884 0.038 172.254);
  --chart-4: oklch(0.904 0.032 172.509);
  --chart-5: oklch(0.84 0.044 355.029);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.023 353.475);
  --foreground: oklch(0.983 0.003 353.65);
  --muted: oklch(0.164 0.01 171.704);
  --muted-foreground: oklch(0.748 0.025 172.556);
  --popover: oklch(0.121 0.023 353.475);
  --popover-foreground: oklch(0.983 0.003 353.65);
  --card: oklch(0.134 0.026 355.053);
  --card-foreground: oklch(0.992 0.001 353.612);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.841 0.04 354.916);
  --primary-foreground: oklch(0.32 0.063 359.056);
  --secondary: oklch(0.884 0.038 172.254);
  --secondary-foreground: oklch(0.383 0.052 168.512);
  --accent: oklch(0.884 0.038 172.254);
  --accent-foreground: oklch(0.383 0.052 168.512);
  --destructive: oklch(0.635 0.245 30.089);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.841 0.04 354.916);
  --chart-1: oklch(0.841 0.04 354.916);
  --chart-2: oklch(0.884 0.038 172.254);
  --chart-3: oklch(0.884 0.038 172.254);
  --chart-4: oklch(0.904 0.032 172.509);
  --chart-5: oklch(0.84 0.044 355.029);
}