fH-Purple for shadcn/ui

fH-Purple is a shadcn/ui theme built around a muted purple primary color (#985786) with muted green accents (#57986a). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#985786) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#080206black
#ffffffwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#040103black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#080206black
#ffffffwhite
Primary
#985786gray
#985786gray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#57986amediumseagreen
#57986amediumseagreen
Secondary foreground
#000000black
#000000black
Muted
#e0f0e5gainsboro
#0f1f13black
Muted foreground
#5e6460dimgray
#9ba19ddarkgray
Accent
#57986amediumseagreen
#57986amediumseagreen
Accent foreground
#000000black
#000000black
Destructive
#6f2b06saddlebrown
#de560dchocolate
Destructive foreground
#fac8adpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#985786gray
#985786gray

Contrast

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

Light mode
Text on background20.55:1AAA
Text on card20.32:1AAA
Primary button5.17:1AA
Secondary button6.12:1AA
Muted text5.12:1AA
Accent6.12:1AA
Destructive6.88:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button5.17:1AA
Secondary button6.12:1AA
Muted text6.50:1AA
Accent6.12:1AA
Destructive3.86:1AA Large

CSS variables

Paste this into your globals.css to use fH-Purple in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.107 0.024 335.831);
  --muted: oklch(0.94 0.023 154.738);
  --muted-foreground: oklch(0.496 0.01 154.827);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.107 0.024 335.831);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.085 0.019 335.831);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.548 0.105 338.402);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.624 0.097 151.837);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.624 0.097 151.837);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.382 0.106 43.644);
  --destructive-foreground: oklch(0.87 0.068 49.742);
  --ring: oklch(0.548 0.105 338.402);
  --chart-1: oklch(0.548 0.105 338.402);
  --chart-2: oklch(0.624 0.097 151.837);
  --chart-3: oklch(0.624 0.097 151.837);
  --chart-4: oklch(0.653 0.102 151.816);
  --chart-5: oklch(0.548 0.116 338.739);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.221 0.031 152.17);
  --muted-foreground: oklch(0.703 0.009 154.957);
  --popover: oklch(0 0 0);
  --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.548 0.105 338.402);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.624 0.097 151.837);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.624 0.097 151.837);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.624 0.184 41.975);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.548 0.105 338.402);
  --chart-1: oklch(0.548 0.105 338.402);
  --chart-2: oklch(0.624 0.097 151.837);
  --chart-3: oklch(0.624 0.097 151.837);
  --chart-4: oklch(0.653 0.102 151.816);
  --chart-5: oklch(0.548 0.116 338.739);
}