Duty for shadcn/ui

Duty is a shadcn/ui theme built around a muted cyan primary color (#a9b6bc) with muted green accents (#b6bca9). The light mode uses a neutral background (#f8fbfc). Dark mode keeps the muted cyan primary (#a9b6bc) on a neutral background (#030608).

Color palette

TokenLightDark
Background
#f8fbfcghostwhite
#030608black
Foreground
#04090cblack
#ffffffwhite
Card
#f5f8fawhitesmoke
#04090bblack
Card foreground
#020608black
#ffffffwhite
Popover
#f8fbfcghostwhite
#030608black
Popover foreground
#04090cblack
#ffffffwhite
Primary
#a9b6bcdarkgray
#a9b6bcdarkgray
Primary foreground
#161b1dblack
#161b1dblack
Secondary
#bca9b6darkgray
#bca9b6darkgray
Secondary foreground
#1d161bblack
#1d161bblack
Muted
#f6eef4whitesmoke
#11090eblack
Muted foreground
#676566dimgray
#9a9899darkgray
Accent
#b6bca9darkgray
#b6bca9darkgray
Accent foreground
#1b1d16black
#1b1d16black
Destructive
#a12712firebrick
#dc3618orangered
Destructive foreground
#fcebe8linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a9b6bcdarkgray
#a9b6bcdarkgray

Contrast

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

Light mode
Text on background19.19:1AAA
Text on card19.11:1AAA
Primary button8.38:1AAA
Secondary button8.00:1AAA
Muted text5.09:1AA
Accent8.75:1AAA
Destructive6.47:1AA
Dark mode
Text on background20.32:1AAA
Text on card20.00:1AAA
Primary button8.38:1AAA
Secondary button8.00:1AAA
Muted text6.85:1AA
Accent8.75:1AAA
Destructive4.57:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0.003 225.015);
  --foreground: oklch(0.135 0.013 220.308);
  --muted: oklch(0.958 0.011 336.087);
  --muted-foreground: oklch(0.509 0.003 335.993);
  --popover: oklch(0.985 0.003 225.015);
  --popover-foreground: oklch(0.135 0.013 220.308);
  --card: oklch(0.978 0.004 225.032);
  --card-foreground: oklch(0.118 0.011 219.657);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.769 0.018 225.261);
  --primary-foreground: oklch(0.217 0.008 225.463);
  --secondary: oklch(0.755 0.03 336.597);
  --secondary-foreground: oklch(0.211 0.014 337.046);
  --accent: oklch(0.786 0.028 120.647);
  --accent-foreground: oklch(0.225 0.013 121.006);
  --destructive: oklch(0.468 0.161 32.285);
  --destructive-foreground: oklch(0.953 0.019 29.548);
  --ring: oklch(0.769 0.018 225.261);
  --chart-1: oklch(0.769 0.018 225.261);
  --chart-2: oklch(0.755 0.03 336.597);
  --chart-3: oklch(0.786 0.028 120.647);
  --chart-4: oklch(0.78 0.027 336.5);
  --chart-5: oklch(0.77 0.022 225.333);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.117 0.01 220.097);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.153 0.018 337.86);
  --muted-foreground: oklch(0.682 0.003 335.955);
  --popover: oklch(0.117 0.01 220.097);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.134 0.012 220.524);
  --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.769 0.018 225.261);
  --primary-foreground: oklch(0.217 0.008 225.463);
  --secondary: oklch(0.755 0.03 336.597);
  --secondary-foreground: oklch(0.211 0.014 337.046);
  --accent: oklch(0.786 0.028 120.647);
  --accent-foreground: oklch(0.225 0.013 121.006);
  --destructive: oklch(0.588 0.207 32.2);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.769 0.018 225.261);
  --chart-1: oklch(0.769 0.018 225.261);
  --chart-2: oklch(0.755 0.03 336.597);
  --chart-3: oklch(0.786 0.028 120.647);
  --chart-4: oklch(0.78 0.027 336.5);
  --chart-5: oklch(0.77 0.022 225.333);
}