Defiant for shadcn/ui

Defiant is a shadcn/ui theme built around a neutral gray primary color (#d0c8c9) with neutral gray accents (#d0ccc8). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#d0c8c9) on a neutral background (#070303).

Color palette

TokenLightDark
Background
#ffffffwhite
#070303black
Foreground
#000000black
#f8f7f7whitesmoke
Card
#ffffffwhite
#070303black
Card foreground
#000000black
#f8f7f7whitesmoke
Popover
#ffffffwhite
#070303black
Popover foreground
#000000black
#f8f7f7whitesmoke
Primary
#d0c8c9lightgrey
#d0c8c9lightgrey
Primary foreground
#372f30darkslategray
#372f30darkslategray
Secondary
#d0c8cclightgrey
#d0c8cclightgrey
Secondary foreground
#372f33darkslategray
#372f33darkslategray
Muted
#f5eff2whitesmoke
#100a0dblack
Muted foreground
#64545cdimgray
#ab9ba4darkgray
Accent
#d0ccc8lightgrey
#d0ccc8lightgrey
Accent foreground
#37332fdarkslategray
#37332fdarkslategray
Destructive
#8a340fsaddlebrown
#e86026chocolate
Destructive foreground
#faddd1antiquewhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d0c8c9lightgrey
#d0c8c9lightgrey

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.94:1AAA
Secondary button7.94:1AAA
Muted text6.26:1AA
Accent7.82:1AAA
Destructive6.32:1AA
Dark mode
Text on background19.19:1AAA
Text on card19.19:1AAA
Primary button7.94:1AAA
Secondary button7.94:1AAA
Muted text7.43:1AAA
Accent7.82:1AAA
Destructive6.15:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.959 0.007 343.632);
  --muted-foreground: oklch(0.464 0.026 344.775);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.84 0.008 14.968);
  --primary-foreground: oklch(0.315 0.01 15.416);
  --secondary: oklch(0.841 0.009 343.724);
  --secondary-foreground: oklch(0.316 0.012 344.381);
  --accent: oklch(0.847 0.006 63.996);
  --accent-foreground: oklch(0.323 0.008 63.771);
  --destructive: oklch(0.443 0.127 40.45);
  --destructive-foreground: oklch(0.919 0.036 44.624);
  --ring: oklch(0.84 0.008 14.968);
  --chart-1: oklch(0.84 0.008 14.968);
  --chart-2: oklch(0.841 0.009 343.724);
  --chart-3: oklch(0.847 0.006 63.996);
  --chart-4: oklch(0.865 0.008 343.674);
  --chart-5: oklch(0.838 0.011 15.047);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.014 16.673);
  --foreground: oklch(0.976 0.002 14.821);
  --muted: oklch(0.153 0.011 345.238);
  --muted-foreground: oklch(0.706 0.023 344.24);
  --popover: oklch(0.107 0.014 16.673);
  --popover-foreground: oklch(0.976 0.002 14.821);
  --card: oklch(0.107 0.014 16.673);
  --card-foreground: oklch(0.976 0.002 14.821);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.84 0.008 14.968);
  --primary-foreground: oklch(0.315 0.01 15.416);
  --secondary: oklch(0.841 0.009 343.724);
  --secondary-foreground: oklch(0.316 0.012 344.381);
  --accent: oklch(0.847 0.006 63.996);
  --accent-foreground: oklch(0.323 0.008 63.771);
  --destructive: oklch(0.655 0.182 40.941);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.84 0.008 14.968);
  --chart-1: oklch(0.84 0.008 14.968);
  --chart-2: oklch(0.841 0.009 343.724);
  --chart-3: oklch(0.847 0.006 63.996);
  --chart-4: oklch(0.865 0.008 343.674);
  --chart-5: oklch(0.838 0.011 15.047);
}