Trooper for shadcn/ui

Trooper is a shadcn/ui theme built around a deep teal primary color (#061816) with deep yellow accents (#181606). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep teal primary (#061816) on a neutral background (#020807).

Color palette

TokenLightDark
Background
#ffffffwhite
#020807black
Foreground
#020808black
#fcfdfdwhite
Card
#fcfcfcsnow
#030c0bblack
Card foreground
#010404black
#ffffffwhite
Popover
#fcfcfcsnow
#030c0bblack
Popover foreground
#010404black
#ffffffwhite
Primary
#061816black
#061816black
Primary foreground
#2fbcablightseagreen
#2fbcablightseagreen
Secondary
#160618black
#160618black
Secondary foreground
#d074dcorchid
#d074dcorchid
Muted
#e0dbe1gainsboro
#231e24black
Muted foreground
#544356darkslategray
#baa9bcsilver
Accent
#181606black
#181606black
Accent foreground
#bcab2fgoldenrod
#bcab2fgoldenrod
Destructive
#a62903firebrick
#f13b04orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#061816black
#061816black

Contrast

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

Light mode
Text on background20.17:1AAA
Text on card20.13:1AAA
Primary button7.71:1AAA
Secondary button6.71:1AA
Muted text6.64:1AA
Accent7.76:1AAA
Destructive7.16:1AAA
Dark mode
Text on background19.78:1AAA
Text on card19.76:1AAA
Primary button7.71:1AAA
Secondary button6.71:1AA
Muted text7.37:1AAA
Accent7.76:1AAA
Destructive3.90:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.126 0.016 188.196);
  --muted: oklch(0.897 0.01 322.15);
  --muted-foreground: oklch(0.407 0.04 322.429);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.1 0.013 188.196);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.1 0.013 188.196);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.195 0.025 185.496);
  --primary-foreground: oklch(0.718 0.117 183.243);
  --secondary: oklch(0.161 0.045 322.974);
  --secondary-foreground: oklch(0.699 0.174 322.79);
  --accent: oklch(0.199 0.029 102.091);
  --accent-foreground: oklch(0.735 0.139 101.485);
  --destructive: oklch(0.478 0.167 34.811);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.195 0.025 185.496);
  --chart-1: oklch(0.195 0.025 185.496);
  --chart-2: oklch(0.161 0.045 322.974);
  --chart-3: oklch(0.199 0.029 102.091);
  --chart-4: oklch(0.196 0.061 322.857);
  --chart-5: oklch(0.196 0.026 185.374);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.015 188.237);
  --foreground: oklch(0.993 0.001 188.887);
  --muted: oklch(0.244 0.014 322.298);
  --muted-foreground: oklch(0.755 0.034 322.265);
  --popover: oklch(0.144 0.017 187.632);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.144 0.017 187.632);
  --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.195 0.025 185.496);
  --primary-foreground: oklch(0.718 0.117 183.243);
  --secondary: oklch(0.161 0.045 322.974);
  --secondary-foreground: oklch(0.699 0.174 322.79);
  --accent: oklch(0.199 0.029 102.091);
  --accent-foreground: oklch(0.735 0.139 101.485);
  --destructive: oklch(0.628 0.224 34.14);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.195 0.025 185.496);
  --chart-1: oklch(0.195 0.025 185.496);
  --chart-2: oklch(0.161 0.045 322.974);
  --chart-3: oklch(0.199 0.029 102.091);
  --chart-4: oklch(0.196 0.061 322.857);
  --chart-5: oklch(0.196 0.026 185.374);
}