Airforce for shadcn/ui

Airforce is a shadcn/ui theme built around a violet primary color (#8a40d4) with muted light violet accents (#c4b7d1). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#8a40d4) on a violet-tinted background (#08040c).

Color palette

TokenLightDark
Background
#ffffffwhite
#08040cblack
Foreground
#08030dblack
#fcfcfdwhite
Card
#ffffffwhite
#08040cblack
Card foreground
#08030dblack
#fcfcfdwhite
Popover
#ffffffwhite
#08040cblack
Popover foreground
#08030dblack
#fcfcfdwhite
Primary
#8a40d4darkorchid
#8a40d4darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d9d4degainsboro
#211d25black
Secondary foreground
#403748darkslategray
#bab2c2silver
Muted
#edeceewhitesmoke
#121113black
Muted foreground
#454346darkslategray
#bab9bcsilver
Accent
#c4b7d1silver
#2e2438darkslategray
Accent foreground
#2b2235darkslategray
#c7bbd3thistle
Destructive
#a21e07firebrick
#f53a19orangered
Destructive foreground
#fee2ddmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8a40d4darkorchid
#8a40d4darkorchid

Contrast

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

Light mode
Text on background20.40:1AAA
Text on card20.40:1AAA
Primary button5.59:1AA
Secondary button7.74:1AAA
Muted text8.31:1AAA
Accent8.01:1AAA
Destructive6.31:1AA
Dark mode
Text on background19.87:1AAA
Text on card19.87:1AAA
Primary button5.59:1AA
Secondary button8.06:1AAA
Muted text9.66:1AAA
Accent8.04:1AAA
Destructive3.80:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.113 0.031 309.987);
  --muted: oklch(0.944 0.004 308.418);
  --muted-foreground: oklch(0.387 0.005 308.319);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.113 0.031 309.987);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.113 0.031 309.987);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.542 0.215 302.573);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.876 0.015 308.276);
  --secondary-foreground: oklch(0.354 0.03 307.512);
  --accent: oklch(0.8 0.039 307.927);
  --accent-foreground: oklch(0.271 0.037 306.925);
  --destructive: oklch(0.461 0.17 31.905);
  --destructive-foreground: oklch(0.933 0.032 29.622);
  --ring: oklch(0.542 0.215 302.573);
  --chart-1: oklch(0.542 0.215 302.573);
  --chart-2: oklch(0.876 0.015 308.276);
  --chart-3: oklch(0.8 0.039 307.927);
  --chart-4: oklch(0.901 0.012 308.318);
  --chart-5: oklch(0.541 0.223 302.162);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.118 0.024 309.729);
  --foreground: oklch(0.991 0.002 308.439);
  --muted: oklch(0.178 0.005 308.123);
  --muted-foreground: oklch(0.787 0.004 308.402);
  --popover: oklch(0.118 0.024 309.729);
  --popover-foreground: oklch(0.991 0.002 308.439);
  --card: oklch(0.118 0.024 309.729);
  --card-foreground: oklch(0.991 0.002 308.439);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.542 0.215 302.573);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.239 0.016 307.719);
  --secondary-foreground: oklch(0.775 0.025 308.105);
  --accent: oklch(0.281 0.037 306.98);
  --accent-foreground: oklch(0.809 0.035 307.981);
  --destructive: oklch(0.635 0.227 32.114);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.542 0.215 302.573);
  --chart-1: oklch(0.542 0.215 302.573);
  --chart-2: oklch(0.239 0.016 307.719);
  --chart-3: oklch(0.281 0.037 306.98);
  --chart-4: oklch(0.269 0.019 307.673);
  --chart-5: oklch(0.541 0.223 302.162);
}