Patriot for shadcn/ui

Patriot is a shadcn/ui theme built around a light violet primary color (#e5ddf9) with light green accents (#ddf9e5). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the light violet primary (#e5ddf9) on a violet-tinted background (#09060e).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#09060eblack
Foreground
#0a0415black
#fcfcfdwhite
Card
#f9f8fcghostwhite
#09060eblack
Card foreground
#0a0415black
#fcfcfdwhite
Popover
#f9f8fcghostwhite
#09060eblack
Popover foreground
#0a0415black
#fcfcfdwhite
Primary
#e5ddf9lavender
#e5ddf9lavender
Primary foreground
#3d198aindigo
#3d198aindigo
Secondary
#f9e5ddmistyrose
#f9e5ddmistyrose
Secondary foreground
#8a3d19saddlebrown
#8a3d19saddlebrown
Muted
#f3eeeclinen
#130e0cblack
Muted foreground
#5f5754dimgray
#aba4a0darkgray
Accent
#ddf9e5honeydew
#ddf9e5honeydew
Accent foreground
#093417darkgreen
#093417darkgreen
Destructive
#b0300cfirebrick
#f1633btomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e5ddf9lavender
#e5ddf9lavender

Contrast

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

Light mode
Text on background19.04:1AAA
Text on card19.04:1AAA
Primary button9.38:1AAA
Secondary button6.26:1AA
Muted text6.14:1AA
Accent12.34:1AAA
Destructive6.39:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button9.38:1AAA
Secondary button6.26:1AA
Muted text7.80:1AAA
Accent12.34:1AAA
Destructive6.59:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 300.667);
  --foreground: oklch(0.132 0.04 297.805);
  --muted: oklch(0.953 0.006 46.785);
  --muted-foreground: oklch(0.464 0.011 46.601);
  --popover: oklch(0.981 0.006 300.667);
  --popover-foreground: oklch(0.132 0.04 297.805);
  --card: oklch(0.981 0.006 300.667);
  --card-foreground: oklch(0.132 0.04 297.805);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.912 0.039 300.06);
  --primary-foreground: oklch(0.348 0.169 288.612);
  --secondary: oklch(0.936 0.024 46.58);
  --secondary-foreground: oklch(0.456 0.115 43.051);
  --accent: oklch(0.956 0.039 155.732);
  --accent-foreground: oklch(0.287 0.069 149.893);
  --destructive: oklch(0.504 0.17 34.714);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.912 0.039 300.06);
  --chart-1: oklch(0.912 0.039 300.06);
  --chart-2: oklch(0.936 0.024 46.58);
  --chart-3: oklch(0.956 0.039 155.732);
  --chart-4: oklch(0.96 0.015 46.684);
  --chart-5: oklch(0.911 0.041 300.028);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.133 0.018 300.093);
  --foreground: oklch(0.991 0.002 300.732);
  --muted: oklch(0.169 0.009 46.31);
  --muted-foreground: oklch(0.723 0.01 46.706);
  --popover: oklch(0.133 0.018 300.093);
  --popover-foreground: oklch(0.991 0.002 300.732);
  --card: oklch(0.133 0.018 300.093);
  --card-foreground: oklch(0.991 0.002 300.732);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.912 0.039 300.06);
  --primary-foreground: oklch(0.348 0.169 288.612);
  --secondary: oklch(0.936 0.024 46.58);
  --secondary-foreground: oklch(0.456 0.115 43.051);
  --accent: oklch(0.956 0.039 155.732);
  --accent-foreground: oklch(0.287 0.069 149.893);
  --destructive: oklch(0.674 0.184 36.183);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.912 0.039 300.06);
  --chart-1: oklch(0.912 0.039 300.06);
  --chart-2: oklch(0.936 0.024 46.58);
  --chart-3: oklch(0.956 0.039 155.732);
  --chart-4: oklch(0.96 0.015 46.684);
  --chart-5: oklch(0.911 0.041 300.028);
}