Scarce for shadcn/ui

Scarce is a shadcn/ui theme built around a vivid purple primary color (#e930f3) with vivid green accents (#3af330). The light mode uses a neutral background (#fcf7fd). Dark mode keeps the vivid purple primary (#e930f3) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf7fdghostwhite
#000000black
Foreground
#0f0510black
#f8f6f8whitesmoke
Card
#fcf7fdghostwhite
#000000black
Card foreground
#0f0510black
#f8f6f8whitesmoke
Popover
#fcf7fdghostwhite
#000000black
Popover foreground
#0f0510black
#f8f6f8whitesmoke
Primary
#e930f3magenta
#e930f3magenta
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#3af330limegreen
#3af330limegreen
Secondary foreground
#095205darkgreen
#095205darkgreen
Muted
#d3ead2gainsboro
#162d15black
Muted foreground
#576756dimgray
#99a998darkseagreen
Accent
#3af330limegreen
#3af330limegreen
Accent foreground
#095205darkgreen
#095205darkgreen
Destructive
#cf4d07chocolate
#f76618chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e930f3magenta
#e930f3magenta

Contrast

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

Light mode
Text on background18.94:1AAA
Text on card18.94:1AAA
Primary button3.39:1AA Large
Secondary button6.31:1AA
Muted text4.73:1AA
Accent6.31:1AA
Destructive4.45:1AA Large
Dark mode
Text on background19.52:1AAA
Text on card19.52:1AAA
Primary button3.39:1AA Large
Secondary button6.31:1AA
Muted text5.94:1AA
Accent6.31:1AA
Destructive6.84:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.009 324.185);
  --foreground: oklch(0.138 0.032 325.512);
  --muted: oklch(0.914 0.041 143.863);
  --muted-foreground: oklch(0.494 0.033 143.729);
  --popover: oklch(0.982 0.009 324.185);
  --popover-foreground: oklch(0.138 0.032 325.512);
  --card: oklch(0.982 0.009 324.185);
  --card-foreground: oklch(0.138 0.032 325.512);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.676 0.288 325.848);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.842 0.267 142.291);
  --secondary-foreground: oklch(0.382 0.125 142.194);
  --accent: oklch(0.842 0.267 142.291);
  --accent-foreground: oklch(0.382 0.125 142.194);
  --destructive: oklch(0.589 0.177 41.413);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.676 0.288 325.848);
  --chart-1: oklch(0.676 0.288 325.848);
  --chart-2: oklch(0.842 0.267 142.291);
  --chart-3: oklch(0.842 0.267 142.291);
  --chart-4: oklch(0.847 0.257 142.323);
  --chart-5: oklch(0.681 0.294 325.842);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.976 0.003 324.15);
  --muted: oklch(0.272 0.053 142.925);
  --muted-foreground: oklch(0.718 0.03 143.88);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.976 0.003 324.15);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.976 0.003 324.15);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.676 0.288 325.848);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.842 0.267 142.291);
  --secondary-foreground: oklch(0.382 0.125 142.194);
  --accent: oklch(0.842 0.267 142.291);
  --accent-foreground: oklch(0.382 0.125 142.194);
  --destructive: oklch(0.683 0.194 42.956);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.676 0.288 325.848);
  --chart-1: oklch(0.676 0.288 325.848);
  --chart-2: oklch(0.842 0.267 142.291);
  --chart-3: oklch(0.842 0.267 142.291);
  --chart-4: oklch(0.847 0.257 142.323);
  --chart-5: oklch(0.681 0.294 325.842);
}