Pasture for shadcn/ui

Pasture is a shadcn/ui theme built around a vivid green primary color (#a5fc3b) with muted light green accents (#c3ccb8). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the vivid green primary (#a5fc3b) on a green-tinted background (#0b0e06).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#0b0e06black
Foreground
#0b1005black
#fdfdfcwhite
Card
#fdfdfcwhite
#0b0e06black
Card foreground
#0b1005black
#fdfdfcwhite
Popover
#fdfdfcwhite
#0b0e06black
Popover foreground
#0b1005black
#fdfdfcwhite
Primary
#a5fc3bgreenyellow
#a5fc3bgreenyellow
Primary foreground
#030500black
#030500black
Secondary
#d1d5cdlightgrey
#24281fblack
Secondary foreground
#393d34darkslategray
#bdc5b5silver
Muted
#e1ead7gainsboro
#202815black
Muted foreground
#5f6558dimgray
#a1a79adarkgray
Accent
#c3ccb8silver
#39432ddarkslategray
Accent foreground
#292f22darkslategray
#d2dac8lightgrey
Destructive
#920901darkred
#f70f02red
Destructive foreground
#fecac7pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a5fc3bgreenyellow
#a5fc3bgreenyellow

Contrast

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

Light mode
Text on background18.93:1AAA
Text on card18.93:1AAA
Primary button16.17:1AAA
Secondary button7.45:1AAA
Muted text4.84:1AA
Accent8.27:1AAA
Destructive6.38:1AA
Dark mode
Text on background19.09:1AAA
Text on card19.09:1AAA
Primary button16.17:1AAA
Secondary button8.44:1AAA
Muted text6.20:1AA
Accent7.26:1AAA
Destructive4.16:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 126.46);
  --foreground: oklch(0.162 0.025 127.074);
  --muted: oklch(0.925 0.026 126.792);
  --muted-foreground: oklch(0.497 0.022 127);
  --popover: oklch(0.994 0.002 126.46);
  --popover-foreground: oklch(0.162 0.025 127.074);
  --card: oklch(0.994 0.002 126.46);
  --card-foreground: oklch(0.162 0.025 127.074);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.902 0.229 131.495);
  --primary-foreground: oklch(0.107 0.026 124.947);
  --secondary: oklch(0.868 0.011 126.585);
  --secondary-foreground: oklch(0.352 0.016 127.028);
  --accent: oklch(0.832 0.028 126.872);
  --accent-foreground: oklch(0.296 0.024 127.524);
  --destructive: oklch(0.419 0.167 29.874);
  --destructive-foreground: oklch(0.885 0.06 21.85);
  --ring: oklch(0.902 0.229 131.495);
  --chart-1: oklch(0.902 0.229 131.495);
  --chart-2: oklch(0.868 0.011 126.585);
  --chart-3: oklch(0.832 0.028 126.872);
  --chart-4: oklch(0.89 0.009 126.555);
  --chart-5: oklch(0.909 0.233 131.654);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.019 126.962);
  --foreground: oklch(0.994 0.003 126.462);
  --muted: oklch(0.262 0.034 128.284);
  --muted-foreground: oklch(0.721 0.02 126.786);
  --popover: oklch(0.158 0.019 126.962);
  --popover-foreground: oklch(0.994 0.003 126.462);
  --card: oklch(0.158 0.019 126.962);
  --card-foreground: oklch(0.994 0.003 126.462);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.902 0.229 131.495);
  --primary-foreground: oklch(0.107 0.026 124.947);
  --secondary: oklch(0.27 0.016 127.229);
  --secondary-foreground: oklch(0.812 0.023 126.799);
  --accent: oklch(0.367 0.037 127.815);
  --accent-foreground: oklch(0.877 0.025 126.798);
  --destructive: oklch(0.617 0.249 29.589);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.902 0.229 131.495);
  --chart-1: oklch(0.902 0.229 131.495);
  --chart-2: oklch(0.27 0.016 127.229);
  --chart-3: oklch(0.367 0.037 127.815);
  --chart-4: oklch(0.303 0.019 127.269);
  --chart-5: oklch(0.909 0.233 131.654);
}