Trumpet for shadcn/ui

Trumpet is a shadcn/ui theme built around a muted green primary color (#749a7c) with muted purple accents (#9a7492). The light mode uses a neutral background (#f8fcf9). Dark mode keeps the muted green primary (#749a7c) on a green-tinted background (#060e08).

Color palette

TokenLightDark
Background
#f8fcf9mintcream
#060e08black
Foreground
#041007black
#ffffffwhite
Card
#f8fcf9mintcream
#060e08black
Card foreground
#041007black
#ffffffwhite
Popover
#f8fcf9mintcream
#060e08black
Popover foreground
#041007black
#ffffffwhite
Primary
#749a7cgray
#749a7cgray
Primary foreground
#000000black
#000000black
Secondary
#9a7492gray
#9a7492gray
Secondary foreground
#000000black
#000000black
Muted
#eeddealavender
#22111eblack
Muted foreground
#444043darkslategray
#bfbbbesilver
Accent
#9a7492gray
#9a7492gray
Accent foreground
#000000black
#000000black
Destructive
#60130bmaroon
#e62e1aorangered
Destructive foreground
#f5b0a8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#749a7cgray
#749a7cgray

Contrast

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

Light mode
Text on background18.70:1AAA
Text on card18.70:1AAA
Primary button6.67:1AA
Secondary button5.29:1AA
Muted text7.84:1AAA
Accent5.29:1AA
Destructive7.28:1AAA
Dark mode
Text on background19.52:1AAA
Text on card19.52:1AAA
Primary button6.67:1AA
Secondary button5.29:1AA
Muted text9.48:1AAA
Accent5.29:1AA
Destructive4.41:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.005 152.536);
  --foreground: oklch(0.158 0.028 151.001);
  --muted: oklch(0.915 0.026 333.053);
  --muted-foreground: oklch(0.378 0.007 332.92);
  --popover: oklch(0.987 0.005 152.536);
  --popover-foreground: oklch(0.158 0.028 151.001);
  --card: oklch(0.987 0.005 152.536);
  --card-foreground: oklch(0.158 0.028 151.001);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.65 0.061 151.024);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.607 0.064 334.163);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.607 0.064 334.163);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.324 0.111 30.321);
  --destructive-foreground: oklch(0.819 0.083 26.134);
  --ring: oklch(0.65 0.061 151.024);
  --chart-1: oklch(0.65 0.061 151.024);
  --chart-2: oklch(0.607 0.064 334.163);
  --chart-3: oklch(0.607 0.064 334.163);
  --chart-4: oklch(0.633 0.059 333.998);
  --chart-5: oklch(0.656 0.072 150.726);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.153 0.019 151.52);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.208 0.037 335.196);
  --muted-foreground: oklch(0.795 0.006 332.737);
  --popover: oklch(0.153 0.019 151.52);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.153 0.019 151.52);
  --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.65 0.061 151.024);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.607 0.064 334.163);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.607 0.064 334.163);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.598 0.22 30.517);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.65 0.061 151.024);
  --chart-1: oklch(0.65 0.061 151.024);
  --chart-2: oklch(0.607 0.064 334.163);
  --chart-3: oklch(0.607 0.064 334.163);
  --chart-4: oklch(0.633 0.059 333.998);
  --chart-5: oklch(0.656 0.072 150.726);
}