Thistle for shadcn/ui

Thistle is a shadcn/ui theme built around a vivid deep green primary color (#023b15) with muted light green accents (#c5d8cb). The light mode uses a neutral background (#fbfefc). Dark mode keeps the vivid deep green primary (#023b15) on a neutral background (#020804).

Color palette

TokenLightDark
Background
#fbfefcwhite
#020804black
Foreground
#000000black
#f8fbf9mintcream
Card
#f7fcf9mintcream
#030c06black
Card foreground
#000000black
#fcfdfcwhite
Popover
#f7fcf9mintcream
#030c06black
Popover foreground
#000000black
#fcfdfcwhite
Primary
#023b15darkgreen
#023b15darkgreen
Primary foreground
#13f65fspringgreen
#13f65fspringgreen
Secondary
#c5d8cblightgrey
#1d2a22darkslategray
Secondary foreground
#2b4032darkslategray
#b1c9b9silver
Muted
#d2e5d8gainsboro
#1a2d21darkslategray
Muted foreground
#4a6452darkslategray
#9bb5a4darkgray
Accent
#c5d8cblightgrey
#1d2a22darkslategray
Accent foreground
#2b4032darkslategray
#b1c9b9silver
Destructive
#be3c09firebrick
#e0470borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#023b15darkgreen
#023b15darkgreen

Contrast

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

Light mode
Text on background20.65:1AAA
Text on card20.30:1AAA
Primary button8.76:1AAA
Secondary button7.48:1AAA
Muted text4.91:1AA
Accent7.48:1AAA
Destructive5.46:1AA
Dark mode
Text on background19.38:1AAA
Text on card19.42:1AAA
Primary button8.76:1AAA
Secondary button8.46:1AAA
Muted text6.61:1AA
Accent8.46:1AAA
Destructive4.13:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 157.197);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.903 0.026 156.671);
  --muted-foreground: oklch(0.476 0.042 155.329);
  --popover: oklch(0.988 0.007 157.127);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.007 157.127);
  --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.308 0.085 148.822);
  --primary-foreground: oklch(0.85 0.25 147.006);
  --secondary: oklch(0.865 0.027 156.609);
  --secondary-foreground: oklch(0.35 0.037 154.888);
  --accent: oklch(0.865 0.027 156.609);
  --accent-foreground: oklch(0.35 0.037 154.888);
  --destructive: oklch(0.541 0.174 37.615);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.308 0.085 148.822);
  --chart-1: oklch(0.308 0.085 148.822);
  --chart-2: oklch(0.865 0.027 156.609);
  --chart-3: oklch(0.865 0.027 156.609);
  --chart-4: oklch(0.886 0.023 156.731);
  --chart-5: oklch(0.311 0.087 148.671);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.019 156.901);
  --foreground: oklch(0.986 0.004 157.179);
  --muted: oklch(0.277 0.034 154.466);
  --muted-foreground: oklch(0.749 0.038 156.197);
  --popover: oklch(0.142 0.022 156.675);
  --popover-foreground: oklch(0.993 0.002 157.222);
  --card: oklch(0.142 0.022 156.675);
  --card-foreground: oklch(0.993 0.002 157.222);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.308 0.085 148.822);
  --primary-foreground: oklch(0.85 0.25 147.006);
  --secondary: oklch(0.271 0.024 155.327);
  --secondary-foreground: oklch(0.812 0.034 156.385);
  --accent: oklch(0.271 0.024 155.327);
  --accent-foreground: oklch(0.812 0.034 156.385);
  --destructive: oklch(0.61 0.198 37.361);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.308 0.085 148.822);
  --chart-1: oklch(0.308 0.085 148.822);
  --chart-2: oklch(0.271 0.024 155.327);
  --chart-3: oklch(0.271 0.024 155.327);
  --chart-4: oklch(0.304 0.028 155.225);
  --chart-5: oklch(0.311 0.087 148.671);
}