Which for shadcn/ui

Which is a shadcn/ui theme built around a deep green primary color (#263e19) with deep green accents (#193e1e). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#263e19) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040802black
#f7f8f6whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#040802black
#f7f8f6whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#040802black
#f7f8f6whitesmoke
Primary
#263e19darkslategray
#263e19darkslategray
Primary foreground
#beddacsilver
#beddacsilver
Secondary
#393e19darkolivegreen
#393e19darkolivegreen
Secondary foreground
#d6ddacpalegoldenrod
#d6ddacpalegoldenrod
Muted
#f0f2e3beige
#1a1c0dblack
Muted foreground
#575856dimgray
#a9a9a7darkgray
Accent
#193e1edarkgreen
#193e1edarkgreen
Accent foreground
#acddb2silver
#acddb2silver
Destructive
#b42508firebrick
#f4320borangered
Destructive foreground
#fef3f0seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#263e19darkslategray
#263e19darkslategray

Contrast

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

Light mode
Text on background20.17:1AAA
Text on card20.17:1AAA
Primary button7.94:1AAA
Secondary button7.93:1AAA
Muted text6.30:1AA
Accent7.89:1AAA
Destructive6.00:1AA
Dark mode
Text on background19.71:1AAA
Text on card19.71:1AAA
Primary button7.94:1AAA
Secondary button7.93:1AAA
Muted text7.35:1AAA
Accent7.89:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.126 0.022 131.961);
  --muted: oklch(0.956 0.02 112.925);
  --muted-foreground: oklch(0.458 0.003 112.657);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.126 0.022 131.961);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.126 0.022 131.961);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.333 0.066 135.263);
  --primary-foreground: oklch(0.862 0.074 134.181);
  --secondary: oklch(0.348 0.056 115.679);
  --secondary-foreground: oklch(0.88 0.065 113.925);
  --accent: oklch(0.326 0.069 146.532);
  --accent-foreground: oklch(0.852 0.078 148.477);
  --destructive: oklch(0.501 0.182 32.396);
  --destructive-foreground: oklch(0.972 0.013 31.071);
  --ring: oklch(0.333 0.066 135.263);
  --chart-1: oklch(0.333 0.066 135.263);
  --chart-2: oklch(0.348 0.056 115.679);
  --chart-3: oklch(0.326 0.069 146.532);
  --chart-4: oklch(0.387 0.064 115.768);
  --chart-5: oklch(0.336 0.07 135.398);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.003 133.626);
  --muted: oklch(0.219 0.027 114.843);
  --muted-foreground: oklch(0.735 0.002 112.607);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.003 133.626);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.979 0.003 133.626);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.333 0.066 135.263);
  --primary-foreground: oklch(0.862 0.074 134.181);
  --secondary: oklch(0.348 0.056 115.679);
  --secondary-foreground: oklch(0.88 0.065 113.925);
  --accent: oklch(0.326 0.069 146.532);
  --accent-foreground: oklch(0.852 0.078 148.477);
  --destructive: oklch(0.626 0.231 32.178);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.333 0.066 135.263);
  --chart-1: oklch(0.333 0.066 135.263);
  --chart-2: oklch(0.348 0.056 115.679);
  --chart-3: oklch(0.326 0.069 146.532);
  --chart-4: oklch(0.387 0.064 115.768);
  --chart-5: oklch(0.336 0.07 135.398);
}