Defiant for shadcn/ui

Defiant is a shadcn/ui theme built around a vivid violet primary color (#c04ee9) with vivid purple accents (#e94ec5). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#c04ee9) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#ffffffwhite
#030203black
Foreground
#070109black
#ffffffwhite
Card
#ffffffwhite
#030203black
Card foreground
#070109black
#ffffffwhite
Popover
#ffffffwhite
#030203black
Popover foreground
#070109black
#ffffffwhite
Primary
#c04ee9mediumorchid
#c04ee9mediumorchid
Primary foreground
#000000black
#000000black
Secondary
#724ee9mediumslateblue
#724ee9mediumslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dedce5gainsboro
#1c1a23black
Muted foreground
#4d4b53darkslategray
#aeacb4darkgray
Accent
#e94ec5hotpink
#e94ec5hotpink
Accent foreground
#050104black
#050104black
Destructive
#c10e01firebrick
#f91201red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c04ee9mediumorchid
#c04ee9mediumorchid

Contrast

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

Light mode
Text on background20.64:1AAA
Text on card20.64:1AAA
Primary button5.50:1AA
Secondary button5.26:1AA
Muted text6.31:1AA
Accent6.28:1AA
Destructive6.31:1AA
Dark mode
Text on background20.74:1AAA
Text on card20.74:1AAA
Primary button5.50:1AA
Secondary button5.26:1AA
Muted text7.65:1AAA
Accent6.28:1AA
Destructive4.11:1AA Large

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.102 0.031 319.786);
  --muted: oklch(0.898 0.013 296.827);
  --muted-foreground: oklch(0.418 0.013 296.51);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.102 0.031 319.786);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.102 0.031 319.786);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.638 0.235 315.658);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.553 0.221 287.583);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.675 0.227 338.456);
  --accent-foreground: oklch(0.082 0.026 334.361);
  --destructive: oklch(0.513 0.205 29.947);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.638 0.235 315.658);
  --chart-1: oklch(0.638 0.235 315.658);
  --chart-2: oklch(0.553 0.221 287.583);
  --chart-3: oklch(0.675 0.227 338.456);
  --chart-4: oklch(0.584 0.206 289.158);
  --chart-5: oklch(0.638 0.242 315.549);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.012 318.387);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.224 0.018 295.62);
  --muted-foreground: oklch(0.748 0.011 296.806);
  --popover: oklch(0.087 0.012 318.387);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.087 0.012 318.387);
  --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.638 0.235 315.658);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.553 0.221 287.583);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.675 0.227 338.456);
  --accent-foreground: oklch(0.082 0.026 334.361);
  --destructive: oklch(0.62 0.249 29.792);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.638 0.235 315.658);
  --chart-1: oklch(0.638 0.235 315.658);
  --chart-2: oklch(0.553 0.221 287.583);
  --chart-3: oklch(0.675 0.227 338.456);
  --chart-4: oklch(0.584 0.206 289.158);
  --chart-5: oklch(0.638 0.242 315.549);
}