Tactics for shadcn/ui

Tactics is a shadcn/ui theme built around a vivid deep green primary color (#044e1d) with vivid deep orange accents (#4e1d04). The light mode uses a neutral background (#fbfefc). Dark mode keeps the vivid deep green primary (#044e1d) on a neutral background (#020804).

Color palette

TokenLightDark
Background
#fbfefcwhite
#020804black
Foreground
#04150ablack
#f5faf7whitesmoke
Card
#f6fdf9mintcream
#030c06black
Card foreground
#031108black
#f8fcf9mintcream
Popover
#fbfefcwhite
#020804black
Popover foreground
#04150ablack
#f5faf7whitesmoke
Primary
#044e1ddarkgreen
#044e1ddarkgreen
Primary foreground
#2af46dspringgreen
#2af46dspringgreen
Secondary
#1d044emidnightblue
#1d044emidnightblue
Secondary foreground
#af8bf9mediumpurple
#af8bf9mediumpurple
Muted
#d7cee9gainsboro
#1f1631black
Muted foreground
#484450darkslategray
#b3afbbdarkgray
Accent
#4e1d04maroon
#4e1d04maroon
Accent foreground
#f9af8blightsalmon
#f9af8blightsalmon
Destructive
#9e2510firebrick
#e93e20orangered
Destructive foreground
#fce7e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#044e1ddarkgreen
#044e1ddarkgreen

Contrast

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

Light mode
Text on background18.53:1AAA
Text on card18.75:1AAA
Primary button6.79:1AA
Secondary button6.69:1AA
Muted text6.26:1AA
Accent7.72:1AAA
Destructive6.49:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.13:1AAA
Primary button6.79:1AA
Secondary button6.69:1AA
Muted text7.99:1AAA
Accent7.72:1AAA
Destructive4.05:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 157.168);
  --foreground: oklch(0.178 0.035 153.949);
  --muted: oklch(0.867 0.037 300.8);
  --muted-foreground: oklch(0.395 0.02 300.664);
  --popover: oklch(0.994 0.005 157.168);
  --popover-foreground: oklch(0.178 0.035 153.949);
  --card: oklch(0.989 0.009 157.069);
  --card-foreground: oklch(0.161 0.03 155.3);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.369 0.104 148.214);
  --primary-foreground: oklch(0.847 0.233 148.368);
  --secondary: oklch(0.222 0.119 287.429);
  --secondary-foreground: oklch(0.715 0.159 297.615);
  --accent: oklch(0.299 0.082 43.779);
  --accent-foreground: oklch(0.817 0.1 47.449);
  --destructive: oklch(0.46 0.16 32.241);
  --destructive-foreground: oklch(0.944 0.024 29.574);
  --ring: oklch(0.369 0.104 148.214);
  --chart-1: oklch(0.369 0.104 148.214);
  --chart-2: oklch(0.222 0.119 287.429);
  --chart-3: oklch(0.299 0.082 43.779);
  --chart-4: oklch(0.247 0.135 286.419);
  --chart-5: oklch(0.373 0.106 148.027);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.019 156.907);
  --foreground: oklch(0.98 0.007 157.125);
  --muted: oklch(0.228 0.051 297.604);
  --muted-foreground: oklch(0.761 0.017 301.129);
  --popover: oklch(0.123 0.019 156.907);
  --popover-foreground: oklch(0.98 0.007 157.125);
  --card: oklch(0.142 0.022 156.694);
  --card-foreground: oklch(0.987 0.004 157.173);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.369 0.104 148.214);
  --primary-foreground: oklch(0.847 0.233 148.368);
  --secondary: oklch(0.222 0.119 287.429);
  --secondary-foreground: oklch(0.715 0.159 297.615);
  --accent: oklch(0.299 0.082 43.779);
  --accent-foreground: oklch(0.817 0.1 47.449);
  --destructive: oklch(0.618 0.211 32.302);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.369 0.104 148.214);
  --chart-1: oklch(0.369 0.104 148.214);
  --chart-2: oklch(0.222 0.119 287.429);
  --chart-3: oklch(0.299 0.082 43.779);
  --chart-4: oklch(0.247 0.135 286.419);
  --chart-5: oklch(0.373 0.106 148.027);
}