Harmonious for shadcn/ui

Harmonious is a shadcn/ui theme built around a purple primary color (#d778e3) with green accents (#84e378). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#d778e3) on a neutral background (#060307).

Color palette

TokenLightDark
Background
#ffffffwhite
#060307black
Foreground
#140317black
#f8f6f9whitesmoke
Card
#fcfcfcsnow
#0a050ablack
Card foreground
#100212black
#fbf9fbsnow
Popover
#ffffffwhite
#060307black
Popover foreground
#140317black
#f8f6f9whitesmoke
Primary
#d778e3orchid
#d778e3orchid
Primary foreground
#1f0722black
#1f0722black
Secondary
#84e378lightgreen
#84e378lightgreen
Secondary foreground
#0a2207black
#0a2207black
Muted
#d6ddd5gainsboro
#232a22darkslategray
Muted foreground
#384936darkslategray
#b8c9b6silver
Accent
#84e378lightgreen
#84e378lightgreen
Accent foreground
#0a2207black
#0a2207black
Destructive
#6b1805maroon
#f5522etomato
Destructive foreground
#fbb7a7lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d778e3orchid
#d778e3orchid

Contrast

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

Light mode
Text on background19.90:1AAA
Text on card19.76:1AAA
Primary button6.88:1AA
Secondary button10.65:1AAA
Muted text6.94:1AA
Accent10.65:1AAA
Destructive7.07:1AAA
Dark mode
Text on background19.04:1AAA
Text on card19.29:1AAA
Primary button6.88:1AA
Secondary button10.65:1AAA
Muted text8.44:1AAA
Accent10.65:1AAA
Destructive3.42:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.147 0.053 323.457);
  --muted: oklch(0.889 0.013 142.064);
  --muted-foreground: oklch(0.386 0.038 141.769);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.147 0.053 323.457);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.133 0.046 323.747);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.715 0.179 322.793);
  --primary-foreground: oklch(0.184 0.061 322.917);
  --secondary: oklch(0.833 0.17 141.462);
  --secondary-foreground: oklch(0.225 0.057 141.203);
  --accent: oklch(0.833 0.17 141.462);
  --accent-foreground: oklch(0.225 0.057 141.203);
  --destructive: oklch(0.35 0.12 33.733);
  --destructive-foreground: oklch(0.838 0.083 33.024);
  --ring: oklch(0.715 0.179 322.793);
  --chart-1: oklch(0.715 0.179 322.793);
  --chart-2: oklch(0.833 0.17 141.462);
  --chart-3: oklch(0.833 0.17 141.462);
  --chart-4: oklch(0.847 0.156 141.51);
  --chart-5: oklch(0.715 0.187 322.808);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.014 323.146);
  --foreground: oklch(0.976 0.004 322.128);
  --muted: oklch(0.276 0.017 141.902);
  --muted-foreground: oklch(0.817 0.032 141.977);
  --popover: oklch(0.111 0.014 323.146);
  --popover-foreground: oklch(0.976 0.004 322.128);
  --card: oklch(0.127 0.016 323.146);
  --card-foreground: oklch(0.984 0.003 322.123);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.715 0.179 322.793);
  --primary-foreground: oklch(0.184 0.061 322.917);
  --secondary: oklch(0.833 0.17 141.462);
  --secondary-foreground: oklch(0.225 0.057 141.203);
  --accent: oklch(0.833 0.17 141.462);
  --accent-foreground: oklch(0.225 0.057 141.203);
  --destructive: oklch(0.659 0.205 34.005);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.715 0.179 322.793);
  --chart-1: oklch(0.715 0.179 322.793);
  --chart-2: oklch(0.833 0.17 141.462);
  --chart-3: oklch(0.833 0.17 141.462);
  --chart-4: oklch(0.847 0.156 141.51);
  --chart-5: oklch(0.715 0.187 322.808);
}