Defiant for shadcn/ui

Defiant is a shadcn/ui theme built around a neutral gray primary color (#5d5657) with neutral gray accents (#565d5c). The light mode uses a neutral background (#fefbfb). Dark mode keeps the neutral gray primary (#5d5657) on a neutral background (#070303).

Color palette

TokenLightDark
Background
#fefbfbsnow
#070303black
Foreground
#000000black
#ffffffwhite
Card
#fdf7f8snow
#0b0405black
Card foreground
#000000black
#ffffffwhite
Popover
#fdf7f8snow
#0b0405black
Popover foreground
#000000black
#ffffffwhite
Primary
#5d5657dimgray
#5d5657dimgray
Primary foreground
#f3f2f2whitesmoke
#f3f2f2whitesmoke
Secondary
#565d5cdimgray
#565d5cdimgray
Secondary foreground
#f2f3f3whitesmoke
#f2f3f3whitesmoke
Muted
#eff5f4whitesmoke
#0a100fblack
Muted foreground
#526f6bdimgray
#90ada8darkgray
Accent
#565d5cdimgray
#565d5cdimgray
Accent foreground
#f2f3f3whitesmoke
#f2f3f3whitesmoke
Destructive
#761805maroon
#f64623orangered
Destructive foreground
#fcbdb1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5d5657dimgray
#5d5657dimgray

Contrast

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

Light mode
Text on background20.38:1AAA
Text on card19.78:1AAA
Primary button6.43:1AA
Secondary button6.08:1AA
Muted text4.96:1AA
Accent6.08:1AA
Destructive6.89:1AA
Dark mode
Text on background20.52:1AAA
Text on card20.29:1AAA
Primary button6.43:1AA
Secondary button6.08:1AA
Muted text7.98:1AAA
Accent6.08:1AA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 6.688);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.966 0.007 186.414);
  --muted-foreground: oklch(0.519 0.035 184.8);
  --popover: oklch(0.98 0.007 6.783);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.007 6.783);
  --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.459 0.009 7.111);
  --primary-foreground: oklch(0.961 0.001 6.624);
  --secondary: oklch(0.471 0.009 186.098);
  --secondary-foreground: oklch(0.963 0.001 186.566);
  --accent: oklch(0.471 0.009 186.098);
  --accent-foreground: oklch(0.963 0.001 186.566);
  --destructive: oklch(0.37 0.131 32.9);
  --destructive-foreground: oklch(0.853 0.075 31.477);
  --ring: oklch(0.459 0.009 7.111);
  --chart-1: oklch(0.459 0.009 7.111);
  --chart-2: oklch(0.471 0.009 186.098);
  --chart-3: oklch(0.471 0.009 186.098);
  --chart-4: oklch(0.499 0.01 186.093);
  --chart-5: oklch(0.455 0.017 7.513);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.014 7.165);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.166 0.01 184.96);
  --muted-foreground: oklch(0.723 0.033 185.412);
  --popover: oklch(0.122 0.016 7.219);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.122 0.016 7.219);
  --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.459 0.009 7.111);
  --primary-foreground: oklch(0.961 0.001 6.624);
  --secondary: oklch(0.471 0.009 186.098);
  --secondary-foreground: oklch(0.963 0.001 186.566);
  --accent: oklch(0.471 0.009 186.098);
  --accent-foreground: oklch(0.963 0.001 186.566);
  --destructive: oklch(0.647 0.217 33.004);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.459 0.009 7.111);
  --chart-1: oklch(0.459 0.009 7.111);
  --chart-2: oklch(0.471 0.009 186.098);
  --chart-3: oklch(0.471 0.009 186.098);
  --chart-4: oklch(0.499 0.01 186.093);
  --chart-5: oklch(0.455 0.017 7.513);
}