Armor for shadcn/ui

Armor is a shadcn/ui theme built around a green primary color (#687f2f) with purple accents (#7f2f68). The light mode uses a neutral background (#fdfefb). Dark mode keeps the green primary (#687f2f) on a green-tinted background (#0d1005).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0d1005black
Foreground
#000000black
#fdfdfcwhite
Card
#fbfdf6snow
#101406black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfdf6snow
#101406black
Popover foreground
#000000black
#ffffffwhite
Primary
#687f2folivedrab
#687f2folivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#2f687fdarkslateblue
#2f687fdarkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eff0f0whitesmoke
#0f1010black
Muted foreground
#5d5f5fdimgray
#a0a1a2darkgray
Accent
#7f2f68purple
#7f2f68purple
Accent foreground
#f7e9f3lavenderblush
#f7e9f3lavenderblush
Destructive
#9c3b02saddlebrown
#fc7b31coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#687f2folivedrab
#687f2folivedrab

Contrast

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

Light mode
Text on background20.77:1AAA
Text on card20.54:1AAA
Primary button4.52:1AA
Secondary button6.16:1AA
Muted text5.63:1AA
Accent7.16:1AAA
Destructive6.93:1AA
Dark mode
Text on background18.91:1AAA
Text on card18.72:1AAA
Primary button4.52:1AA
Secondary button6.16:1AA
Muted text7.38:1AAA
Accent7.16:1AAA
Destructive8.03:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.005 119.383);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.955 0.001 223.144);
  --muted-foreground: oklch(0.484 0.002 223.17);
  --popover: oklch(0.992 0.009 119.463);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0.009 119.463);
  --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.56 0.109 123.312);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.489 0.07 226.79);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.439 0.13 340.29);
  --accent-foreground: oklch(0.947 0.02 335.573);
  --destructive: oklch(0.481 0.141 42.834);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.56 0.109 123.312);
  --chart-1: oklch(0.56 0.109 123.312);
  --chart-2: oklch(0.489 0.07 226.79);
  --chart-3: oklch(0.439 0.13 340.29);
  --chart-4: oklch(0.519 0.074 226.855);
  --chart-5: oklch(0.567 0.115 123.541);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.164 0.024 120.852);
  --foreground: oklch(0.993 0.001 119.326);
  --muted: oklch(0.17 0.002 223.252);
  --muted-foreground: oklch(0.708 0.002 223.155);
  --popover: oklch(0.181 0.028 121.634);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.181 0.028 121.634);
  --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.56 0.109 123.312);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.489 0.07 226.79);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.439 0.13 340.29);
  --accent-foreground: oklch(0.947 0.02 335.573);
  --destructive: oklch(0.723 0.178 46.808);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.56 0.109 123.312);
  --chart-1: oklch(0.56 0.109 123.312);
  --chart-2: oklch(0.489 0.07 226.79);
  --chart-3: oklch(0.439 0.13 340.29);
  --chart-4: oklch(0.519 0.074 226.855);
  --chart-5: oklch(0.567 0.115 123.541);
}