Treasured for shadcn/ui

Treasured is a shadcn/ui theme built around a muted green primary color (#5f8650) with muted light green accents (#d2d8cf). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the muted green primary (#5f8650) on a neutral background (#040802).

Color palette

TokenLightDark
Background
#fcfdfcwhite
#040802black
Foreground
#071004black
#f6faf5whitesmoke
Card
#fcfdfcwhite
#040802black
Card foreground
#071004black
#f6faf5whitesmoke
Popover
#fcfdfcwhite
#040802black
Popover foreground
#071004black
#f6faf5whitesmoke
Primary
#5f8650dimgray
#5f8650dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e0e1e0gainsboro
#2b2d2adarkslategray
Secondary foreground
#474847darkslategray
#c3c7c2silver
Muted
#e1f0dbgainsboro
#15240fblack
Muted foreground
#464a45darkslategray
#b6bab5silver
Accent
#d2d8cflightgrey
#384135darkslategray
Accent foreground
#384135darkslategray
#d2d8cflightgrey
Destructive
#85130fmaroon
#e83730crimson
Destructive foreground
#f9cecdpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5f8650dimgray
#5f8650dimgray

Contrast

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

Light mode
Text on background19.00:1AAA
Text on card19.00:1AAA
Primary button4.19:1AA Large
Secondary button6.99:1AA
Muted text7.58:1AAA
Accent7.31:1AAA
Destructive7.02:1AAA
Dark mode
Text on background19.15:1AAA
Text on card19.15:1AAA
Primary button4.19:1AA Large
Secondary button8.12:1AAA
Muted text8.29:1AAA
Accent7.36:1AAA
Destructive4.18:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 137.195);
  --foreground: oklch(0.16 0.03 136.141);
  --muted: oklch(0.938 0.031 137.269);
  --muted-foreground: oklch(0.404 0.011 137.253);
  --popover: oklch(0.993 0.002 137.195);
  --popover-foreground: oklch(0.16 0.03 136.141);
  --card: oklch(0.993 0.002 137.195);
  --card-foreground: oklch(0.16 0.03 136.141);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.576 0.09 137.685);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.908 0.001 137.192);
  --secondary-foreground: oklch(0.401 0.003 137.205);
  --accent: oklch(0.875 0.014 137.226);
  --accent-foreground: oklch(0.362 0.023 137.347);
  --destructive: oklch(0.398 0.149 28.513);
  --destructive-foreground: oklch(0.888 0.049 20.443);
  --ring: oklch(0.576 0.09 137.685);
  --chart-1: oklch(0.576 0.09 137.685);
  --chart-2: oklch(0.908 0.001 137.192);
  --chart-3: oklch(0.875 0.014 137.226);
  --chart-4: oklch(0.931 0.001 137.191);
  --chart-5: oklch(0.583 0.1 137.762);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.019 135.658);
  --foreground: oklch(0.98 0.007 137.205);
  --muted: oklch(0.239 0.042 137.794);
  --muted-foreground: oklch(0.785 0.009 137.217);
  --popover: oklch(0.124 0.019 135.658);
  --popover-foreground: oklch(0.98 0.007 137.205);
  --card: oklch(0.124 0.019 135.658);
  --card-foreground: oklch(0.98 0.007 137.205);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.576 0.09 137.685);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.294 0.007 137.247);
  --secondary-foreground: oklch(0.825 0.007 137.21);
  --accent: oklch(0.362 0.023 137.347);
  --accent-foreground: oklch(0.875 0.014 137.226);
  --destructive: oklch(0.611 0.214 27.724);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.576 0.09 137.685);
  --chart-1: oklch(0.576 0.09 137.685);
  --chart-2: oklch(0.294 0.007 137.247);
  --chart-3: oklch(0.362 0.023 137.347);
  --chart-4: oklch(0.325 0.008 137.249);
  --chart-5: oklch(0.583 0.1 137.762);
}