Expense for shadcn/ui

Expense is a shadcn/ui theme built around a muted deep purple primary color (#3d2a41) with muted deep purple accents (#412a3a). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep purple primary (#3d2a41) on a purple-tinted background (#0a030c).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a030cblack
Foreground
#0b020dblack
#fdfbfdsnow
Card
#fcfcfcsnow
#0e0510black
Card foreground
#070109black
#ffffffwhite
Popover
#fcfcfcsnow
#0e0510black
Popover foreground
#070109black
#ffffffwhite
Primary
#3d2a41darkslategray
#3d2a41darkslategray
Primary foreground
#d5c4d9thistle
#d5c4d9thistle
Secondary
#312a41darkslategray
#312a41darkslategray
Secondary foreground
#cbc4d9thistle
#cbc4d9thistle
Muted
#dddce0gainsboro
#201f23black
Muted foreground
#45424ddarkslategray
#b6b2bdsilver
Accent
#412a3adarkslategray
#412a3adarkslategray
Accent foreground
#d9c4d2thistle
#d9c4d2thistle
Destructive
#cf360cfirebrick
#d9390dorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3d2a41darkslategray
#3d2a41darkslategray

Contrast

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

Light mode
Text on background20.41:1AAA
Text on card20.19:1AAA
Primary button7.93:1AAA
Secondary button8.09:1AAA
Muted text7.18:1AAA
Accent7.90:1AAA
Destructive5.00:1AA
Dark mode
Text on background19.73:1AAA
Text on card20.08:1AAA
Primary button7.93:1AAA
Secondary button8.09:1AAA
Muted text7.85:1AAA
Accent7.90:1AAA
Destructive4.63:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.118 0.038 321.947);
  --muted: oklch(0.896 0.006 300.666);
  --muted-foreground: oklch(0.386 0.02 299.925);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.103 0.033 322.512);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.103 0.033 322.512);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.317 0.048 320.096);
  --primary-foreground: oklch(0.841 0.035 320.029);
  --secondary: oklch(0.303 0.043 298.362);
  --secondary-foreground: oklch(0.832 0.03 300.167);
  --accent: oklch(0.319 0.043 339.036);
  --accent-foreground: oklch(0.842 0.031 337.259);
  --destructive: oklch(0.565 0.195 34.373);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.317 0.048 320.096);
  --chart-1: oklch(0.317 0.048 320.096);
  --chart-2: oklch(0.303 0.043 298.362);
  --chart-3: oklch(0.319 0.043 339.036);
  --chart-4: oklch(0.329 0.048 298.287);
  --chart-5: oklch(0.316 0.055 320.099);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.027 321.539);
  --foreground: oklch(0.991 0.003 319.994);
  --muted: oklch(0.243 0.008 300.246);
  --muted-foreground: oklch(0.77 0.017 300.414);
  --popover: oklch(0.135 0.031 320.828);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.135 0.031 320.828);
  --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.317 0.048 320.096);
  --primary-foreground: oklch(0.841 0.035 320.029);
  --secondary: oklch(0.303 0.043 298.362);
  --secondary-foreground: oklch(0.832 0.03 300.167);
  --accent: oklch(0.319 0.043 339.036);
  --accent-foreground: oklch(0.842 0.031 337.259);
  --destructive: oklch(0.584 0.202 34.328);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.317 0.048 320.096);
  --chart-1: oklch(0.317 0.048 320.096);
  --chart-2: oklch(0.303 0.043 298.362);
  --chart-3: oklch(0.319 0.043 339.036);
  --chart-4: oklch(0.329 0.048 298.287);
  --chart-5: oklch(0.316 0.055 320.099);
}