Penny for shadcn/ui

Penny is a shadcn/ui theme built around a muted purple primary color (#bfa1bc) with muted light purple accents (#e2d0e0). The light mode uses a neutral background (#fcf7fc). Dark mode keeps the muted purple primary (#bfa1bc) on a neutral background (#040104).

Color palette

TokenLightDark
Background
#fcf7fcsnow
#040104black
Foreground
#000000black
#fcf8fbsnow
Card
#fbf4faghostwhite
#080207black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fcf7fcsnow
#040104black
Popover foreground
#000000black
#fcf8fbsnow
Primary
#bfa1bcdarkgray
#bfa1bcdarkgray
Primary foreground
#1b131ablack
#1b131ablack
Secondary
#ece4eblavender
#1d161cblack
Secondary foreground
#5c425adimgray
#bca9basilver
Muted
#e7e4e7gainsboro
#1b181bblack
Muted foreground
#483746darkslategray
#c8b7c6silver
Accent
#e2d0e0gainsboro
#3d293bdarkslategray
Accent foreground
#4f304cdarkslategray
#d6c2d4thistle
Destructive
#bf3d0dfirebrick
#f16837tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bfa1bcdarkgray
#bfa1bcdarkgray

Contrast

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

Light mode
Text on background19.91:1AAA
Text on card19.38:1AAA
Primary button7.82:1AAA
Secondary button7.08:1AAA
Muted text8.71:1AAA
Accent7.68:1AAA
Destructive5.42:1AA
Dark mode
Text on background19.72:1AAA
Text on card20.04:1AAA
Primary button7.82:1AAA
Secondary button8.03:1AAA
Muted text9.26:1AAA
Accent7.92:1AAA
Destructive6.79:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 328.68);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.922 0.005 328.652);
  --muted-foreground: oklch(0.362 0.034 329.573);
  --popover: oklch(0.982 0.008 328.68);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.974 0.012 328.725);
  --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.744 0.051 329.326);
  --primary-foreground: oklch(0.2 0.021 329.674);
  --secondary: oklch(0.927 0.013 328.742);
  --secondary-foreground: oklch(0.416 0.053 329.905);
  --accent: oklch(0.876 0.03 328.965);
  --accent-foreground: oklch(0.359 0.062 330.345);
  --destructive: oklch(0.543 0.174 37.176);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.744 0.051 329.326);
  --chart-1: oklch(0.744 0.051 329.326);
  --chart-2: oklch(0.927 0.013 328.742);
  --chart-3: oklch(0.876 0.03 328.965);
  --chart-4: oklch(0.952 0.008 328.689);
  --chart-5: oklch(0.742 0.059 329.438);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.018 329.786);
  --foreground: oklch(0.983 0.006 328.658);
  --muted: oklch(0.214 0.007 328.955);
  --muted-foreground: oklch(0.798 0.028 328.97);
  --popover: oklch(0.086 0.018 329.786);
  --popover-foreground: oklch(0.983 0.006 328.658);
  --card: oklch(0.109 0.023 329.786);
  --card-foreground: oklch(0.992 0.003 328.625);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.744 0.051 329.326);
  --primary-foreground: oklch(0.2 0.021 329.674);
  --secondary: oklch(0.212 0.014 329.311);
  --secondary-foreground: oklch(0.757 0.031 329.038);
  --accent: oklch(0.312 0.041 329.945);
  --accent-foreground: oklch(0.836 0.032 329.008);
  --destructive: oklch(0.681 0.18 39.422);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.744 0.051 329.326);
  --chart-1: oklch(0.744 0.051 329.326);
  --chart-2: oklch(0.212 0.014 329.311);
  --chart-3: oklch(0.312 0.041 329.945);
  --chart-4: oklch(0.244 0.018 329.373);
  --chart-5: oklch(0.742 0.059 329.438);
}