Warrior for shadcn/ui

Warrior is a shadcn/ui theme built around a near-white primary color (#fcfefb) with neutral gray accents (#d9d9d8). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-white primary (#fcfefb) on a green-tinted background (#070b04).

Color palette

TokenLightDark
Background
#ffffffwhite
#070b04black
Foreground
#070c03black
#fafbf8snow
Card
#fcfcfcsnow
#090f05black
Card foreground
#050802black
#fcfdfcwhite
Popover
#fcfcfcsnow
#090f05black
Popover foreground
#050802black
#fcfdfcwhite
Primary
#fcfefbwhite
#fcfefbwhite
Primary foreground
#2b520fdarkgreen
#2b520fdarkgreen
Secondary
#d9d9d8gainsboro
#141514black
Secondary foreground
#40403fdarkslategray
#adb1aadarkgray
Muted
#d8ded4gainsboro
#252b21darkslategray
Muted foreground
#5a6850dimgray
#a1af97darkgray
Accent
#d9d9d8gainsboro
#141514black
Accent foreground
#40403fdarkslategray
#adb1aadarkgray
Destructive
#9d3e0bsaddlebrown
#f06e28chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fcfefbwhite
#fcfefbwhite

Contrast

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

Light mode
Text on background19.75:1AAA
Text on card19.71:1AAA
Primary button8.95:1AAA
Secondary button7.35:1AAA
Muted text4.32:1AA Large
Accent7.35:1AAA
Destructive6.69:1AA
Dark mode
Text on background19.06:1AAA
Text on card18.99:1AAA
Primary button8.95:1AAA
Secondary button8.39:1AAA
Muted text6.26:1AA
Accent8.39:1AAA
Destructive6.98:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.145 0.025 130.462);
  --muted: oklch(0.893 0.015 131.86);
  --muted-foreground: oklch(0.498 0.041 132.427);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.126 0.021 130.257);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.126 0.021 130.257);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.995 0.005 131.767);
  --primary-foreground: oklch(0.396 0.105 135.413);
  --secondary: oklch(0.885 0.001 131.735);
  --secondary-foreground: oklch(0.372 0.002 131.776);
  --accent: oklch(0.885 0.001 131.735);
  --accent-foreground: oklch(0.372 0.002 131.776);
  --destructive: oklch(0.489 0.139 42.985);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.995 0.005 131.767);
  --chart-1: oklch(0.995 0.005 131.767);
  --chart-2: oklch(0.885 0.001 131.735);
  --chart-3: oklch(0.885 0.001 131.735);
  --chart-4: oklch(0.908 0.001 131.733);
  --chart-5: oklch(0.995 0.005 131.769);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.143 0.021 130.573);
  --foreground: oklch(0.987 0.004 131.76);
  --muted: oklch(0.281 0.02 132.317);
  --muted-foreground: oklch(0.737 0.037 132.145);
  --popover: oklch(0.16 0.024 131.533);
  --popover-foreground: oklch(0.994 0.002 131.742);
  --card: oklch(0.16 0.024 131.533);
  --card-foreground: oklch(0.994 0.002 131.742);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.995 0.005 131.767);
  --primary-foreground: oklch(0.396 0.105 135.413);
  --secondary: oklch(0.195 0.004 131.874);
  --secondary-foreground: oklch(0.754 0.01 131.834);
  --accent: oklch(0.195 0.004 131.874);
  --accent-foreground: oklch(0.754 0.01 131.834);
  --destructive: oklch(0.686 0.178 44.851);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.995 0.005 131.767);
  --chart-1: oklch(0.995 0.005 131.767);
  --chart-2: oklch(0.195 0.004 131.874);
  --chart-3: oklch(0.195 0.004 131.874);
  --chart-4: oklch(0.229 0.005 131.892);
  --chart-5: oklch(0.995 0.005 131.769);
}