Scarce for shadcn/ui

Scarce is a shadcn/ui theme built around a green primary color (#bfd289) with violet accents (#9c89d2). The light mode uses a neutral background (#fdfefb). Dark mode keeps the green primary (#bfd289) on a green-tinted background (#0d0f05).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0d0f05black
Foreground
#000000black
#fdfdfcwhite
Card
#fdfefbwhite
#0d0f05black
Card foreground
#000000black
#fdfdfcwhite
Popover
#fdfefbwhite
#0d0f05black
Popover foreground
#000000black
#fdfdfcwhite
Primary
#bfd289tan
#bfd289tan
Primary foreground
#191e0bblack
#191e0bblack
Secondary
#9c89d2mediumpurple
#9c89d2mediumpurple
Secondary foreground
#100b1eblack
#100b1eblack
Muted
#ded9edgainsboro
#171226black
Muted foreground
#605a72dimgray
#938da5lightslategray
Accent
#9c89d2mediumpurple
#9c89d2mediumpurple
Accent foreground
#100b1eblack
#100b1eblack
Destructive
#a12e12brown
#e6461eorangered
Destructive foreground
#fcece8linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bfd289tan
#bfd289tan

Contrast

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

Light mode
Text on background20.76:1AAA
Text on card20.76:1AAA
Primary button10.38:1AAA
Secondary button6.34:1AA
Muted text4.75:1AA
Accent6.34:1AA
Destructive6.28:1AA
Dark mode
Text on background18.93:1AAA
Text on card18.93:1AAA
Primary button10.38:1AAA
Secondary button6.34:1AA
Muted text5.73:1AA
Accent6.34:1AA
Destructive3.99:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 118.643);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.895 0.029 298.004);
  --muted-foreground: oklch(0.482 0.04 297.112);
  --popover: oklch(0.996 0.004 118.643);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.996 0.004 118.643);
  --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.832 0.099 120.731);
  --primary-foreground: oklch(0.223 0.033 121.41);
  --secondary: oklch(0.675 0.108 295.618);
  --secondary-foreground: oklch(0.168 0.038 294.251);
  --accent: oklch(0.675 0.108 295.618);
  --accent-foreground: oklch(0.168 0.038 294.251);
  --destructive: oklch(0.475 0.155 34.501);
  --destructive-foreground: oklch(0.955 0.019 34.297);
  --ring: oklch(0.832 0.099 120.731);
  --chart-1: oklch(0.832 0.099 120.731);
  --chart-2: oklch(0.675 0.108 295.618);
  --chart-3: oklch(0.675 0.108 295.618);
  --chart-4: oklch(0.706 0.097 296.063);
  --chart-5: oklch(0.838 0.105 120.859);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.163 0.023 120.115);
  --foreground: oklch(0.994 0.002 118.608);
  --muted: oklch(0.199 0.041 294.657);
  --muted-foreground: oklch(0.656 0.037 297.585);
  --popover: oklch(0.163 0.023 120.115);
  --popover-foreground: oklch(0.994 0.002 118.608);
  --card: oklch(0.163 0.023 120.115);
  --card-foreground: oklch(0.994 0.002 118.608);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.832 0.099 120.731);
  --primary-foreground: oklch(0.223 0.033 121.41);
  --secondary: oklch(0.675 0.108 295.618);
  --secondary-foreground: oklch(0.168 0.038 294.251);
  --accent: oklch(0.675 0.108 295.618);
  --accent-foreground: oklch(0.168 0.038 294.251);
  --destructive: oklch(0.62 0.203 34.484);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.832 0.099 120.731);
  --chart-1: oklch(0.832 0.099 120.731);
  --chart-2: oklch(0.675 0.108 295.618);
  --chart-3: oklch(0.675 0.108 295.618);
  --chart-4: oklch(0.706 0.097 296.063);
  --chart-5: oklch(0.838 0.105 120.859);
}