Gavel for shadcn/ui

Gavel is a shadcn/ui theme built around a vivid purple primary color (#fd5dcd) with muted light purple accents (#d1bdcb). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#fd5dcd) on a purple-tinted background (#10050c).

Color palette

TokenLightDark
Background
#ffffffwhite
#10050cblack
Foreground
#050103black
#f8f6f8whitesmoke
Card
#ffffffwhite
#10050cblack
Card foreground
#050103black
#f8f6f8whitesmoke
Popover
#ffffffwhite
#10050cblack
Popover foreground
#050103black
#f8f6f8whitesmoke
Primary
#fd5dcdhotpink
#fd5dcdhotpink
Primary foreground
#28001cblack
#28001cblack
Secondary
#ddd4dbgainsboro
#181116black
Secondary foreground
#473843darkslategray
#bc9fb3darkgray
Muted
#ede3ealavender
#1c1219black
Muted foreground
#73596bdimgray
#a68c9erosybrown
Accent
#d1bdcbthistle
#311c2adarkslategray
Accent foreground
#362631darkslategray
#d0aec6silver
Destructive
#e62200red
#ff3814orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fd5dcdhotpink
#fd5dcdhotpink

Contrast

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

Light mode
Text on background20.74:1AAA
Text on card20.74:1AAA
Primary button6.91:1AA
Secondary button7.59:1AAA
Muted text4.98:1AA
Accent8.00:1AAA
Destructive4.58:1AA
Dark mode
Text on background18.64:1AAA
Text on card18.64:1AAA
Primary button6.91:1AA
Secondary button7.74:1AAA
Muted text5.97:1AA
Accent7.94:1AAA
Destructive3.60:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.082 0.026 336.628);
  --muted: oklch(0.926 0.014 336.146);
  --muted-foreground: oklch(0.496 0.044 337.466);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.082 0.026 336.628);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.082 0.026 336.628);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.723 0.226 341.515);
  --primary-foreground: oklch(0.188 0.079 342.658);
  --secondary: oklch(0.88 0.013 336.15);
  --secondary-foreground: oklch(0.362 0.028 337.247);
  --accent: oklch(0.819 0.03 336.538);
  --accent-foreground: oklch(0.291 0.032 337.788);
  --destructive: oklch(0.591 0.228 31.338);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.723 0.226 341.515);
  --chart-1: oklch(0.723 0.226 341.515);
  --chart-2: oklch(0.88 0.013 336.15);
  --chart-3: oklch(0.819 0.03 336.538);
  --chart-4: oklch(0.904 0.011 336.086);
  --chart-5: oklch(0.724 0.231 341.676);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.029 338.069);
  --foreground: oklch(0.976 0.003 335.918);
  --muted: oklch(0.198 0.02 337.686);
  --muted-foreground: oklch(0.669 0.041 336.984);
  --popover: oklch(0.137 0.029 338.069);
  --popover-foreground: oklch(0.976 0.003 335.918);
  --card: oklch(0.137 0.029 338.069);
  --card-foreground: oklch(0.976 0.003 335.918);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.723 0.226 341.515);
  --primary-foreground: oklch(0.188 0.079 342.658);
  --secondary: oklch(0.188 0.016 337.361);
  --secondary-foreground: oklch(0.734 0.045 336.97);
  --accent: oklch(0.259 0.04 338.591);
  --accent-foreground: oklch(0.788 0.051 337.046);
  --destructive: oklch(0.65 0.237 31.947);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.723 0.226 341.515);
  --chart-1: oklch(0.723 0.226 341.515);
  --chart-2: oklch(0.188 0.016 337.361);
  --chart-3: oklch(0.259 0.04 338.591);
  --chart-4: oklch(0.22 0.021 337.544);
  --chart-5: oklch(0.724 0.231 341.676);
}