Witness for shadcn/ui

Witness is a shadcn/ui theme built around a green primary color (#9bd945) with green accents (#51d945). The light mode uses a neutral background (#fafcf8). Dark mode keeps the green primary (#9bd945) on a green-tinted background (#0b0e07).

Color palette

TokenLightDark
Background
#fafcf8snow
#0b0e07black
Foreground
#080c03black
#ffffffwhite
Card
#fafcf8snow
#0b0e07black
Card foreground
#080c03black
#ffffffwhite
Popover
#fafcf8snow
#0b0e07black
Popover foreground
#080c03black
#ffffffwhite
Primary
#9bd945yellowgreen
#9bd945yellowgreen
Primary foreground
#2d440edarkgreen
#2d440edarkgreen
Secondary
#d9cd45darkkhaki
#d9cd45darkkhaki
Secondary foreground
#443f0edarkolivegreen
#443f0edarkolivegreen
Muted
#eeeeecwhitesmoke
#131311black
Muted foreground
#706f5cdimgray
#a3a28fdarkgray
Accent
#51d945limegreen
#51d945limegreen
Accent foreground
#12440edarkgreen
#12440edarkgreen
Destructive
#c23b05firebrick
#f95d1forangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9bd945yellowgreen
#9bd945yellowgreen

Contrast

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

Light mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button6.37:1AA
Secondary button6.47:1AA
Muted text4.39:1AA Large
Accent6.10:1AA
Destructive5.37:1AA
Dark mode
Text on background19.47:1AAA
Text on card19.47:1AAA
Primary button6.37:1AA
Secondary button6.47:1AA
Muted text7.19:1AAA
Accent6.10:1AA
Destructive6.62:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.006 125.134);
  --foreground: oklch(0.147 0.024 124.547);
  --muted: oklch(0.949 0.003 102.265);
  --muted-foreground: oklch(0.536 0.028 103.019);
  --popover: oklch(0.989 0.006 125.134);
  --popover-foreground: oklch(0.147 0.024 124.547);
  --card: oklch(0.989 0.006 125.134);
  --card-foreground: oklch(0.147 0.024 124.547);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.815 0.186 129.418);
  --primary-foreground: oklch(0.355 0.083 129.591);
  --secondary: oklch(0.833 0.152 104.088);
  --secondary-foreground: oklch(0.363 0.067 104.066);
  --accent: oklch(0.782 0.221 141.929);
  --accent-foreground: oklch(0.34 0.098 141.924);
  --destructive: oklch(0.546 0.18 37.102);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.815 0.186 129.418);
  --chart-1: oklch(0.815 0.186 129.418);
  --chart-2: oklch(0.833 0.152 104.088);
  --chart-3: oklch(0.782 0.221 141.929);
  --chart-4: oklch(0.843 0.146 104.121);
  --chart-5: oklch(0.823 0.192 129.614);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.156 0.016 125.669);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.186 0.005 102.605);
  --muted-foreground: oklch(0.707 0.027 102.801);
  --popover: oklch(0.156 0.016 125.669);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.156 0.016 125.669);
  --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.815 0.186 129.418);
  --primary-foreground: oklch(0.355 0.083 129.591);
  --secondary: oklch(0.833 0.152 104.088);
  --secondary-foreground: oklch(0.363 0.067 104.066);
  --accent: oklch(0.782 0.221 141.929);
  --accent-foreground: oklch(0.34 0.098 141.924);
  --destructive: oklch(0.677 0.203 39.016);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.815 0.186 129.418);
  --chart-1: oklch(0.815 0.186 129.418);
  --chart-2: oklch(0.833 0.152 104.088);
  --chart-3: oklch(0.782 0.221 141.929);
  --chart-4: oklch(0.843 0.146 104.121);
  --chart-5: oklch(0.823 0.192 129.614);
}