Scheme for shadcn/ui

Scheme is a shadcn/ui theme built around a violet primary color (#9344d5) with green accents (#85d544). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the violet primary (#9344d5) on a neutral background (#030204).

Color palette

TokenLightDark
Background
#fdfbfewhite
#030204black
Foreground
#050109black
#f8f5f9whitesmoke
Card
#faf7fdghostwhite
#050307black
Card foreground
#030104black
#faf9fbghostwhite
Popover
#fdfbfewhite
#030204black
Popover foreground
#050109black
#f8f5f9whitesmoke
Primary
#9344d5darkorchid
#9344d5darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#85d544yellowgreen
#85d544yellowgreen
Secondary foreground
#243e0edarkgreen
#243e0edarkgreen
Muted
#f2f3f1whitesmoke
#0d0e0cblack
Muted foreground
#515350darkslategray
#adafacdarkgray
Accent
#85d544yellowgreen
#85d544yellowgreen
Accent foreground
#243e0edarkgreen
#243e0edarkgreen
Destructive
#9e1710firebrick
#e92a20crimson
Destructive foreground
#fce4e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9344d5darkorchid
#9344d5darkorchid

Contrast

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

Light mode
Text on background20.10:1AAA
Text on card19.62:1AAA
Primary button5.20:1AA
Secondary button6.52:1AA
Muted text6.99:1AA
Accent6.52:1AA
Destructive6.73:1AA
Dark mode
Text on background19.19:1AAA
Text on card19.55:1AAA
Primary button5.20:1AA
Secondary button6.52:1AA
Muted text8.77:1AAA
Accent6.52:1AA
Destructive4.35:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 310.403);
  --foreground: oklch(0.097 0.032 312.993);
  --muted: oklch(0.964 0.003 130.467);
  --muted-foreground: oklch(0.44 0.006 130.56);
  --popover: oklch(0.99 0.004 310.403);
  --popover-foreground: oklch(0.097 0.032 312.993);
  --card: oklch(0.981 0.007 310.367);
  --card-foreground: oklch(0.077 0.025 312.993);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.559 0.213 305.741);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.792 0.193 133.869);
  --secondary-foreground: oklch(0.332 0.08 133.808);
  --accent: oklch(0.792 0.193 133.869);
  --accent-foreground: oklch(0.332 0.08 133.808);
  --destructive: oklch(0.449 0.17 29.145);
  --destructive-foreground: oklch(0.939 0.026 21.259);
  --ring: oklch(0.559 0.213 305.741);
  --chart-1: oklch(0.559 0.213 305.741);
  --chart-2: oklch(0.792 0.193 133.869);
  --chart-3: oklch(0.792 0.193 133.869);
  --chart-4: oklch(0.804 0.183 133.459);
  --chart-5: oklch(0.558 0.221 305.415);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.013 311.648);
  --foreground: oklch(0.974 0.006 310.381);
  --muted: oklch(0.161 0.005 130.71);
  --muted-foreground: oklch(0.752 0.005 130.5);
  --popover: oklch(0.085 0.013 311.648);
  --popover-foreground: oklch(0.974 0.006 310.381);
  --card: oklch(0.107 0.016 311.648);
  --card-foreground: oklch(0.983 0.004 310.4);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.559 0.213 305.741);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.792 0.193 133.869);
  --secondary-foreground: oklch(0.332 0.08 133.808);
  --accent: oklch(0.792 0.193 133.869);
  --accent-foreground: oklch(0.332 0.08 133.808);
  --destructive: oklch(0.603 0.225 29.019);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.559 0.213 305.741);
  --chart-1: oklch(0.559 0.213 305.741);
  --chart-2: oklch(0.792 0.193 133.869);
  --chart-3: oklch(0.792 0.193 133.869);
  --chart-4: oklch(0.804 0.183 133.459);
  --chart-5: oklch(0.558 0.221 305.415);
}