Stamen for shadcn/ui

Stamen is a shadcn/ui theme built around a muted green primary color (#527d4a) with muted light green accents (#cedccb). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#527d4a) on a green-tinted background (#060a05).

Color palette

TokenLightDark
Background
#ffffffwhite
#060a05black
Foreground
#061603black
#f7f8f6whitesmoke
Card
#ffffffwhite
#060a05black
Card foreground
#061603black
#f7f8f6whitesmoke
Popover
#ffffffwhite
#060a05black
Popover foreground
#061603black
#f7f8f6whitesmoke
Primary
#527d4adarkolivegreen
#527d4adarkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dee4ddgainsboro
#2c372adarkslategray
Secondary foreground
#42503fdarkslategray
#c5d0c2silver
Muted
#dbeed8gainsboro
#152711black
Muted foreground
#4f564edarkslategray
#abb1a9darkgray
Accent
#cedccblightgrey
#3b5436darkslategray
Accent foreground
#334630darkslategray
#d9e5d7gainsboro
Destructive
#87150ddarkred
#eb3528crimson
Destructive foreground
#facfccpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#527d4adarkolivegreen
#527d4adarkolivegreen

Contrast

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

Light mode
Text on background18.68:1AAA
Text on card18.68:1AAA
Primary button4.76:1AA
Secondary button6.63:1AA
Muted text6.22:1AA
Accent7.14:1AAA
Destructive6.92:1AA
Dark mode
Text on background18.69:1AAA
Text on card18.69:1AAA
Primary button4.76:1AA
Secondary button7.82:1AAA
Muted text7.19:1AAA
Accent6.44:1AA
Destructive4.13:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.181 0.046 139.107);
  --muted: oklch(0.93 0.036 140.472);
  --muted-foreground: oklch(0.443 0.016 140.477);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.181 0.046 139.107);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.181 0.046 139.107);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.545 0.091 140.339);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.912 0.012 140.511);
  --secondary-foreground: oklch(0.413 0.033 140.412);
  --accent: oklch(0.879 0.027 140.485);
  --accent-foreground: oklch(0.371 0.044 140.368);
  --destructive: oklch(0.403 0.15 29.525);
  --destructive-foreground: oklch(0.89 0.049 22.916);
  --ring: oklch(0.545 0.091 140.339);
  --chart-1: oklch(0.545 0.091 140.339);
  --chart-2: oklch(0.912 0.012 140.511);
  --chart-3: oklch(0.879 0.027 140.485);
  --chart-4: oklch(0.934 0.009 140.517);
  --chart-5: oklch(0.551 0.101 140.34);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.016 139.444);
  --foreground: oklch(0.978 0.003 140.527);
  --muted: oklch(0.251 0.047 140.343);
  --muted-foreground: oklch(0.754 0.014 140.503);
  --popover: oklch(0.138 0.016 139.444);
  --popover-foreground: oklch(0.978 0.003 140.527);
  --card: oklch(0.138 0.016 139.444);
  --card-foreground: oklch(0.978 0.003 140.527);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.545 0.091 140.339);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.322 0.026 140.412);
  --secondary-foreground: oklch(0.846 0.023 140.49);
  --accent: oklch(0.416 0.058 140.351);
  --accent-foreground: oklch(0.909 0.023 140.492);
  --destructive: oklch(0.615 0.219 29.213);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.545 0.091 140.339);
  --chart-1: oklch(0.545 0.091 140.339);
  --chart-2: oklch(0.322 0.026 140.412);
  --chart-3: oklch(0.416 0.058 140.351);
  --chart-4: oklch(0.353 0.029 140.408);
  --chart-5: oklch(0.551 0.101 140.34);
}