Which for shadcn/ui

Which is a shadcn/ui theme built around a vivid light violet primary color (#bf8afe) with vivid light green accents (#8afebf). The light mode uses a neutral background (#faf8fc). Dark mode keeps the vivid light violet primary (#bf8afe) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#020203black
Foreground
#07030dblack
#ffffffwhite
Card
#f7f5fawhitesmoke
#050307black
Card foreground
#050208black
#ffffffwhite
Popover
#f7f5fawhitesmoke
#050307black
Popover foreground
#050208black
#ffffffwhite
Primary
#bf8afeplum
#bf8afeplum
Primary foreground
#270056midnightblue
#270056midnightblue
Secondary
#febf8aburlywood
#febf8aburlywood
Secondary foreground
#562700maroon
#562700maroon
Muted
#f4f2f0whitesmoke
#0f0d0bblack
Muted foreground
#695b4fdimgray
#b0a296darkgray
Accent
#8afebfaquamarine
#8afebfaquamarine
Accent foreground
#005627darkgreen
#005627darkgreen
Destructive
#99130adarkred
#dd1c0ered
Destructive foreground
#fddbd9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bf8afeplum
#bf8afeplum

Contrast

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

Light mode
Text on background19.36:1AAA
Text on card19.01:1AAA
Primary button6.79:1AA
Secondary button7.71:1AAA
Muted text5.86:1AA
Accent7.22:1AAA
Destructive6.62:1AA
Dark mode
Text on background20.75:1AAA
Text on card20.52:1AAA
Primary button6.79:1AA
Secondary button7.71:1AAA
Muted text7.83:1AAA
Accent7.22:1AAA
Destructive4.96:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 306.365);
  --foreground: oklch(0.113 0.03 307.674);
  --muted: oklch(0.962 0.003 62.152);
  --muted-foreground: oklch(0.48 0.026 61.436);
  --popover: oklch(0.973 0.007 306.332);
  --popover-foreground: oklch(0.099 0.026 308.075);
  --card: oklch(0.973 0.007 306.332);
  --card-foreground: oklch(0.099 0.026 308.075);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.732 0.169 303.239);
  --primary-foreground: oklch(0.242 0.133 293.977);
  --secondary: oklch(0.85 0.1 60.171);
  --secondary-foreground: oklch(0.333 0.084 52.922);
  --accent: oklch(0.913 0.139 157.946);
  --accent-foreground: oklch(0.397 0.106 151.199);
  --destructive: oklch(0.438 0.168 29.696);
  --destructive-foreground: oklch(0.919 0.038 22.714);
  --ring: oklch(0.732 0.169 303.239);
  --chart-1: oklch(0.732 0.169 303.239);
  --chart-2: oklch(0.85 0.1 60.171);
  --chart-3: oklch(0.913 0.139 157.946);
  --chart-4: oklch(0.868 0.087 60.588);
  --chart-5: oklch(0.73 0.174 303.119);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.011 307.251);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.159 0.005 61.791);
  --muted-foreground: oklch(0.721 0.023 61.754);
  --popover: oklch(0.107 0.014 307.251);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.107 0.014 307.251);
  --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.732 0.169 303.239);
  --primary-foreground: oklch(0.242 0.133 293.977);
  --secondary: oklch(0.85 0.1 60.171);
  --secondary-foreground: oklch(0.333 0.084 52.922);
  --accent: oklch(0.913 0.139 157.946);
  --accent-foreground: oklch(0.397 0.106 151.199);
  --destructive: oklch(0.571 0.223 29.747);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.732 0.169 303.239);
  --chart-1: oklch(0.732 0.169 303.239);
  --chart-2: oklch(0.85 0.1 60.171);
  --chart-3: oklch(0.913 0.139 157.946);
  --chart-4: oklch(0.868 0.087 60.588);
  --chart-5: oklch(0.73 0.174 303.119);
}