Defensive for shadcn/ui

Defensive is a shadcn/ui theme built around a vivid orange primary color (#d17c05) with vivid violet accents (#7c05d1). The light mode uses a neutral background (#fdfaf7). Dark mode keeps the vivid orange primary (#d17c05) on a neutral background (#040302).

Color palette

TokenLightDark
Background
#fdfaf7snow
#040302black
Foreground
#0d0903black
#fcfaf8snow
Card
#fcf8f2floralwhite
#070503black
Card foreground
#090602black
#fdfdfcwhite
Popover
#fdfaf7snow
#040302black
Popover foreground
#0d0903black
#fcfaf8snow
Primary
#d17c05darkgoldenrod
#d17c05darkgoldenrod
Primary foreground
#0a0600black
#0a0600black
Secondary
#05d17cspringgreen
#05d17cspringgreen
Secondary foreground
#000a06black
#000a06black
Muted
#eff6f3whitesmoke
#09100dblack
Muted foreground
#46534edarkslategray
#acb9b4darkgray
Accent
#7c05d1darkviolet
#7c05d1darkviolet
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#e41801red
#fe2d16orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d17c05darkgoldenrod
#d17c05darkgoldenrod

Contrast

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

Light mode
Text on background19.15:1AAA
Text on card19.15:1AAA
Primary button6.34:1AA
Secondary button9.94:1AAA
Muted text7.33:1AAA
Accent7.49:1AAA
Destructive4.72:1AA
Dark mode
Text on background19.82:1AAA
Text on card19.95:1AAA
Primary button6.34:1AA
Secondary button9.94:1AAA
Muted text9.45:1AAA
Accent7.49:1AAA
Destructive3.75:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 76.624);
  --foreground: oklch(0.14 0.019 84.032);
  --muted: oklch(0.967 0.009 169.411);
  --muted-foreground: oklch(0.428 0.018 168.456);
  --popover: oklch(0.988 0.006 76.624);
  --popover-foreground: oklch(0.14 0.019 84.032);
  --card: oklch(0.981 0.009 76.609);
  --card-foreground: oklch(0.122 0.016 85.039);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.664 0.149 64.054);
  --primary-foreground: oklch(0.125 0.024 88.327);
  --secondary: oklch(0.756 0.183 155.795);
  --secondary-foreground: oklch(0.129 0.025 170.068);
  --accent: oklch(0.483 0.253 301.675);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.584 0.231 30.326);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.664 0.149 64.054);
  --chart-1: oklch(0.664 0.149 64.054);
  --chart-2: oklch(0.756 0.183 155.795);
  --chart-3: oklch(0.483 0.253 301.675);
  --chart-4: oklch(0.797 0.194 155.706);
  --chart-5: oklch(0.669 0.152 63.391);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.008 81.782);
  --foreground: oklch(0.986 0.003 76.638);
  --muted: oklch(0.166 0.013 167.266);
  --muted-foreground: oklch(0.773 0.015 169.099);
  --popover: oklch(0.095 0.008 81.782);
  --popover-foreground: oklch(0.986 0.003 76.638);
  --card: oklch(0.12 0.009 81.782);
  --card-foreground: oklch(0.993 0.002 76.645);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.664 0.149 64.054);
  --primary-foreground: oklch(0.125 0.024 88.327);
  --secondary: oklch(0.756 0.183 155.795);
  --secondary-foreground: oklch(0.129 0.025 170.068);
  --accent: oklch(0.483 0.253 301.675);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.641 0.242 30.502);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.664 0.149 64.054);
  --chart-1: oklch(0.664 0.149 64.054);
  --chart-2: oklch(0.756 0.183 155.795);
  --chart-3: oklch(0.483 0.253 301.675);
  --chart-4: oklch(0.797 0.194 155.706);
  --chart-5: oklch(0.669 0.152 63.391);
}