Gavel for shadcn/ui

Gavel is a shadcn/ui theme built around a deep green primary color (#103210) with deep purple accents (#321032). The light mode uses a neutral background (#fbfefb). Dark mode keeps the deep green primary (#103210) on a green-tinted background (#050a05).

Color palette

TokenLightDark
Background
#fbfefbwhite
#050a05black
Foreground
#000000black
#ffffffwhite
Card
#fbfefbwhite
#050a05black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfefbwhite
#050a05black
Popover foreground
#000000black
#ffffffwhite
Primary
#103210black
#103210black
Primary foreground
#4ac44alimegreen
#4ac44alimegreen
Secondary
#321032midnightblue
#321032midnightblue
Secondary foreground
#dd97ddplum
#dd97ddplum
Muted
#efe1eflavender
#1e101eblack
Muted foreground
#6d5f6ddimgray
#a092a0darkgray
Accent
#321032midnightblue
#321032midnightblue
Accent foreground
#dd97ddplum
#dd97ddplum
Destructive
#b14310sienna
#e55715chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#103210black
#103210black

Contrast

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

Light mode
Text on background20.67:1AAA
Text on card20.67:1AAA
Primary button6.24:1AA
Secondary button7.58:1AAA
Muted text4.75:1AA
Accent7.58:1AAA
Destructive5.67:1AA
Dark mode
Text on background19.93:1AAA
Text on card19.93:1AAA
Primary button6.24:1AA
Secondary button7.58:1AAA
Muted text6.20:1AA
Accent7.58:1AAA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.006 145.533);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.925 0.025 325.778);
  --muted-foreground: oklch(0.504 0.028 325.99);
  --popover: oklch(0.994 0.006 145.533);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.994 0.006 145.533);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.283 0.07 143.439);
  --primary-foreground: oklch(0.727 0.196 143.234);
  --secondary: oklch(0.244 0.075 327.571);
  --secondary-foreground: oklch(0.768 0.124 326.699);
  --accent: oklch(0.244 0.075 327.571);
  --accent-foreground: oklch(0.768 0.124 326.699);
  --destructive: oklch(0.529 0.154 40.949);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.283 0.07 143.439);
  --chart-1: oklch(0.283 0.07 143.439);
  --chart-2: oklch(0.244 0.075 327.571);
  --chart-3: oklch(0.244 0.075 327.571);
  --chart-4: oklch(0.276 0.089 327.647);
  --chart-5: oklch(0.286 0.073 143.351);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.017 144.593);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.199 0.036 326.83);
  --muted-foreground: oklch(0.676 0.026 325.865);
  --popover: oklch(0.137 0.017 144.593);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.137 0.017 144.593);
  --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.283 0.07 143.439);
  --primary-foreground: oklch(0.727 0.196 143.234);
  --secondary: oklch(0.244 0.075 327.571);
  --secondary-foreground: oklch(0.768 0.124 326.699);
  --accent: oklch(0.244 0.075 327.571);
  --accent-foreground: oklch(0.768 0.124 326.699);
  --destructive: oklch(0.637 0.189 40.577);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.283 0.07 143.439);
  --chart-1: oklch(0.283 0.07 143.439);
  --chart-2: oklch(0.244 0.075 327.571);
  --chart-3: oklch(0.244 0.075 327.571);
  --chart-4: oklch(0.276 0.089 327.647);
  --chart-5: oklch(0.286 0.073 143.351);
}