Scarce for shadcn/ui

Scarce is a shadcn/ui theme built around a muted green primary color (#bcc3ac) with muted violet accents (#b3acc3). The light mode uses a neutral background (#fdfdfb). Dark mode keeps the muted green primary (#bcc3ac) on a neutral background (#060802).

Color palette

TokenLightDark
Background
#fdfdfbsnow
#060802black
Foreground
#060802black
#fdfdfcwhite
Card
#fdfdfbsnow
#060802black
Card foreground
#060802black
#fdfdfcwhite
Popover
#fdfdfbsnow
#060802black
Popover foreground
#060802black
#fdfdfcwhite
Primary
#bcc3acsilver
#bcc3acsilver
Primary foreground
#20231ablack
#20231ablack
Secondary
#b3acc3silver
#b3acc3silver
Secondary foreground
#1d1a23black
#1d1a23black
Muted
#ecebeflavender
#111014black
Muted foreground
#45424ddarkslategray
#b6b2bdsilver
Accent
#b3acc3silver
#b3acc3silver
Accent foreground
#1d1a23black
#1d1a23black
Destructive
#d03b16firebrick
#e74218orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bcc3acsilver
#bcc3acsilver

Contrast

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

Light mode
Text on background19.81:1AAA
Text on card19.81:1AAA
Primary button8.76:1AAA
Secondary button7.86:1AAA
Muted text8.28:1AAA
Accent7.86:1AAA
Destructive4.87:1AA
Dark mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button8.76:1AAA
Secondary button7.86:1AAA
Muted text9.11:1AAA
Accent7.86:1AAA
Destructive4.06: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.994 0.003 120.812);
  --foreground: oklch(0.13 0.021 120.505);
  --muted: oklch(0.943 0.005 300.673);
  --muted-foreground: oklch(0.386 0.02 299.925);
  --popover: oklch(0.994 0.003 120.812);
  --popover-foreground: oklch(0.13 0.021 120.505);
  --card: oklch(0.994 0.003 120.812);
  --card-foreground: oklch(0.13 0.021 120.505);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.805 0.032 121.435);
  --primary-foreground: oklch(0.252 0.018 121.997);
  --secondary: oklch(0.758 0.033 300.044);
  --secondary-foreground: oklch(0.225 0.019 299.337);
  --accent: oklch(0.758 0.033 300.044);
  --accent-foreground: oklch(0.225 0.019 299.337);
  --destructive: oklch(0.571 0.191 34.272);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.805 0.032 121.435);
  --chart-1: oklch(0.805 0.032 121.435);
  --chart-2: oklch(0.758 0.033 300.044);
  --chart-3: oklch(0.758 0.033 300.044);
  --chart-4: oklch(0.785 0.029 300.15);
  --chart-5: oklch(0.81 0.038 121.555);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.018 120.54);
  --foreground: oklch(0.994 0.002 120.802);
  --muted: oklch(0.176 0.008 299.995);
  --muted-foreground: oklch(0.77 0.017 300.414);
  --popover: oklch(0.128 0.018 120.54);
  --popover-foreground: oklch(0.994 0.002 120.802);
  --card: oklch(0.128 0.018 120.54);
  --card-foreground: oklch(0.994 0.002 120.802);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.805 0.032 121.435);
  --primary-foreground: oklch(0.252 0.018 121.997);
  --secondary: oklch(0.758 0.033 300.044);
  --secondary-foreground: oklch(0.225 0.019 299.337);
  --accent: oklch(0.758 0.033 300.044);
  --accent-foreground: oklch(0.225 0.019 299.337);
  --destructive: oklch(0.617 0.208 34.207);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.805 0.032 121.435);
  --chart-1: oklch(0.805 0.032 121.435);
  --chart-2: oklch(0.758 0.033 300.044);
  --chart-3: oklch(0.758 0.033 300.044);
  --chart-4: oklch(0.785 0.029 300.15);
  --chart-5: oklch(0.81 0.038 121.555);
}