Precious for shadcn/ui

Precious is a shadcn/ui theme built around a neutral gray primary color (#b2b1b4) with neutral gray accents (#b3b1b4). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the neutral gray primary (#b2b1b4) on a neutral background (#040208).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#040208black
Foreground
#05020eblack
#f9f8fcghostwhite
Card
#f6f4fbghostwhite
#06040cblack
Card foreground
#030109black
#fcfbfdsnow
Popover
#f9f8fcghostwhite
#040208black
Popover foreground
#05020eblack
#f9f8fcghostwhite
Primary
#b2b1b4darkgray
#b2b1b4darkgray
Primary foreground
#19191ablack
#19191ablack
Secondary
#b1b2b4darkgray
#b1b2b4darkgray
Secondary foreground
#19191ablack
#19191ablack
Muted
#ebeceflavender
#101114black
Muted foreground
#3f3f40darkslategray
#bfbfc0silver
Accent
#b3b1b4darkgray
#b3b1b4darkgray
Accent foreground
#1a191ablack
#1a191ablack
Destructive
#9c1407darkred
#db1c0ared
Destructive foreground
#fddbd8mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b2b1b4darkgray
#b2b1b4darkgray

Contrast

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

Light mode
Text on background19.40:1AAA
Text on card19.02:1AAA
Primary button8.22:1AAA
Secondary button8.26:1AAA
Muted text8.90:1AAA
Accent8.23:1AAA
Destructive6.48:1AA
Dark mode
Text on background19.49:1AAA
Text on card19.80:1AAA
Primary button8.22:1AAA
Secondary button8.26:1AAA
Muted text10.29:1AAA
Accent8.23:1AAA
Destructive5.01:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.006 297.72);
  --foreground: oklch(0.103 0.037 296.69);
  --muted: oklch(0.943 0.005 271.361);
  --muted-foreground: oklch(0.369 0.002 271.367);
  --popover: oklch(0.98 0.006 297.72);
  --popover-foreground: oklch(0.103 0.037 296.69);
  --card: oklch(0.971 0.009 297.666);
  --card-foreground: oklch(0.089 0.032 297.231);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.762 0.004 297.723);
  --primary-foreground: oklch(0.214 0.002 297.658);
  --secondary: oklch(0.763 0.003 271.368);
  --secondary-foreground: oklch(0.215 0.002 271.342);
  --accent: oklch(0.763 0.005 317.752);
  --accent-foreground: oklch(0.215 0.002 317.746);
  --destructive: oklch(0.443 0.17 30.125);
  --destructive-foreground: oklch(0.919 0.038 24.033);
  --ring: oklch(0.762 0.004 297.723);
  --chart-1: oklch(0.762 0.004 297.723);
  --chart-2: oklch(0.763 0.003 271.368);
  --chart-3: oklch(0.763 0.005 317.752);
  --chart-4: oklch(0.787 0.003 271.374);
  --chart-5: oklch(0.757 0.011 297.567);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.02 297.508);
  --foreground: oklch(0.981 0.005 297.728);
  --muted: oklch(0.177 0.007 270.971);
  --muted-foreground: oklch(0.804 0.001 271.393);
  --popover: oklch(0.1 0.02 297.508);
  --popover-foreground: oklch(0.981 0.005 297.728);
  --card: oklch(0.114 0.023 297.368);
  --card-foreground: oklch(0.99 0.003 297.777);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.762 0.004 297.723);
  --primary-foreground: oklch(0.214 0.002 297.658);
  --secondary: oklch(0.763 0.003 271.368);
  --secondary-foreground: oklch(0.215 0.002 271.342);
  --accent: oklch(0.763 0.005 317.752);
  --accent-foreground: oklch(0.215 0.002 317.746);
  --destructive: oklch(0.569 0.222 30.067);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.762 0.004 297.723);
  --chart-1: oklch(0.762 0.004 297.723);
  --chart-2: oklch(0.763 0.003 271.368);
  --chart-3: oklch(0.763 0.005 317.752);
  --chart-4: oklch(0.787 0.003 271.374);
  --chart-5: oklch(0.757 0.011 297.567);
}