Defiant for shadcn/ui

Defiant is a shadcn/ui theme built around a near-white primary color (#ffffff) with muted light red accents (#d6cdcd). The light mode uses a neutral background (#fefbfb). Dark mode keeps the near-white primary (#ffffff) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfbsnow
#000000black
Foreground
#080202black
#ffffffwhite
Card
#fefbfbsnow
#000000black
Card foreground
#080202black
#ffffffwhite
Popover
#fefbfbsnow
#000000black
Popover foreground
#080202black
#ffffffwhite
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#e4e2e2gainsboro
#382e2edarkslategray
Secondary foreground
#4c4848darkslategray
#d1c7c7lightgrey
Muted
#e8d9d9gainsboro
#261717black
Muted foreground
#635a5adimgray
#a59c9cdarkgray
Accent
#d6cdcdlightgrey
#4f3636darkslategray
Accent foreground
#3e3232darkslategray
#e2d5d5gainsboro
Destructive
#9a1a0efirebrick
#ea301fcrimson
Destructive foreground
#fce1demistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background20.03:1AAA
Text on card20.03:1AAA
Primary button12.63:1AAA
Secondary button6.99:1AA
Muted text4.88:1AA
Accent7.85:1AAA
Destructive6.71:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button12.63:1AAA
Secondary button7.95:1AAA
Muted text6.43:1AA
Accent7.71:1AAA
Destructive4.24: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.991 0.002 17.199);
  --foreground: oklch(0.101 0.022 21.686);
  --muted: oklch(0.897 0.017 17.473);
  --muted-foreground: oklch(0.475 0.012 17.592);
  --popover: oklch(0.991 0.002 17.199);
  --popover-foreground: oklch(0.101 0.022 21.686);
  --card: oklch(0.991 0.002 17.199);
  --card-foreground: oklch(0.101 0.022 21.686);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.914 0.002 17.191);
  --secondary-foreground: oklch(0.405 0.006 17.403);
  --accent: oklch(0.854 0.01 17.356);
  --accent-foreground: oklch(0.331 0.016 18);
  --destructive: oklch(0.444 0.164 30.025);
  --destructive-foreground: oklch(0.931 0.03 23.925);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.914 0.002 17.191);
  --chart-3: oklch(0.854 0.01 17.356);
  --chart-4: oklch(0.938 0.001 17.181);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.225 0.025 19.208);
  --muted-foreground: oklch(0.701 0.011 17.421);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.312 0.015 17.981);
  --secondary-foreground: oklch(0.838 0.011 17.384);
  --accent: oklch(0.361 0.036 18.997);
  --accent-foreground: oklch(0.882 0.015 17.442);
  --destructive: oklch(0.609 0.223 29.975);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.312 0.015 17.981);
  --chart-3: oklch(0.361 0.036 18.997);
  --chart-4: oklch(0.341 0.017 18.008);
  --chart-5: oklch(1 0 180);
}