Duel for shadcn/ui

Duel is a shadcn/ui theme built around a deep green primary color (#325e13) with deep green accents (#135e19). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the deep green primary (#325e13) on a green-tinted background (#091004).

Color palette

TokenLightDark
Background
#fcfdfcwhite
#091004black
Foreground
#0c1406black
#f7f8f6whitesmoke
Card
#fcfdfcwhite
#091004black
Card foreground
#0c1406black
#f7f8f6whitesmoke
Popover
#fcfdfcwhite
#091004black
Popover foreground
#0c1406black
#f7f8f6whitesmoke
Primary
#325e13darkolivegreen
#325e13darkolivegreen
Primary foreground
#ccf0b2palegoldenrod
#ccf0b2palegoldenrod
Secondary
#575e13darkolivegreen
#575e13darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f0f0ealinen
#15150fblack
Muted foreground
#4b4c3ddarkslategray
#c0c2b3silver
Accent
#135e19darkgreen
#135e19darkgreen
Accent foreground
#b2f0b7palegreen
#b2f0b7palegreen
Destructive
#772d0dsaddlebrown
#dc5318chocolate
Destructive foreground
#f8d0bfpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#325e13darkolivegreen
#325e13darkolivegreen

Contrast

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

Light mode
Text on background18.44:1AAA
Text on card18.44:1AAA
Primary button6.09:1AA
Secondary button6.98:1AA
Muted text7.66:1AAA
Accent6.09:1AA
Destructive6.79:1AA
Dark mode
Text on background18.10:1AAA
Text on card18.10:1AAA
Primary button6.09:1AA
Secondary button6.98:1AA
Muted text10.13:1AAA
Accent6.09:1AA
Destructive3.95:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 131.743);
  --foreground: oklch(0.177 0.031 132.596);
  --muted: oklch(0.954 0.009 110.414);
  --muted-foreground: oklch(0.412 0.024 111.333);
  --popover: oklch(0.994 0.002 131.743);
  --popover-foreground: oklch(0.177 0.031 132.596);
  --card: oklch(0.994 0.002 131.743);
  --card-foreground: oklch(0.177 0.031 132.596);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.433 0.114 135.36);
  --primary-foreground: oklch(0.914 0.089 132.583);
  --secondary: oklch(0.46 0.095 114.367);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.421 0.124 143.987);
  --accent-foreground: oklch(0.899 0.099 146.827);
  --destructive: oklch(0.4 0.112 40.805);
  --destructive-foreground: oklch(0.887 0.051 44.493);
  --ring: oklch(0.433 0.114 135.36);
  --chart-1: oklch(0.433 0.114 135.36);
  --chart-2: oklch(0.46 0.095 114.367);
  --chart-3: oklch(0.421 0.124 143.987);
  --chart-4: oklch(0.503 0.105 114.426);
  --chart-5: oklch(0.437 0.118 135.546);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.162 0.028 131.489);
  --foreground: oklch(0.979 0.003 131.747);
  --muted: oklch(0.193 0.012 111.432);
  --muted-foreground: oklch(0.808 0.021 110.726);
  --popover: oklch(0.162 0.028 131.489);
  --popover-foreground: oklch(0.979 0.003 131.747);
  --card: oklch(0.162 0.028 131.489);
  --card-foreground: oklch(0.979 0.003 131.747);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.433 0.114 135.36);
  --primary-foreground: oklch(0.914 0.089 132.583);
  --secondary: oklch(0.46 0.095 114.367);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.421 0.124 143.987);
  --accent-foreground: oklch(0.899 0.099 146.827);
  --destructive: oklch(0.619 0.183 39.935);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.433 0.114 135.36);
  --chart-1: oklch(0.433 0.114 135.36);
  --chart-2: oklch(0.46 0.095 114.367);
  --chart-3: oklch(0.421 0.124 143.987);
  --chart-4: oklch(0.503 0.105 114.426);
  --chart-5: oklch(0.437 0.118 135.546);
}