Privacy for shadcn/ui

Privacy is a shadcn/ui theme built around a neutral gray primary color (#7f8c7d) with neutral gray accents (#8a7d8c). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the neutral gray primary (#7f8c7d) on a green-tinted background (#070e06).

Color palette

TokenLightDark
Background
#f8fdf7mintcream
#070e06black
Foreground
#060f05black
#f9fbf8mintcream
Card
#f8fdf7mintcream
#070e06black
Card foreground
#060f05black
#f9fbf8mintcream
Popover
#f8fdf7mintcream
#070e06black
Popover foreground
#060f05black
#f9fbf8mintcream
Primary
#7f8c7dgray
#7f8c7dgray
Primary foreground
#000000black
#000000black
Secondary
#8a7d8cgray
#8a7d8cgray
Secondary foreground
#000000black
#000000black
Muted
#dfdce0gainsboro
#231f23black
Muted foreground
#67586adimgray
#a495a7darkgray
Accent
#8a7d8cgray
#8a7d8cgray
Accent foreground
#000000black
#000000black
Destructive
#922507saddlebrown
#ef3d0borangered
Destructive foreground
#fdd8cebisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7f8c7dgray
#7f8c7dgray

Contrast

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

Light mode
Text on background18.89:1AAA
Text on card18.89:1AAA
Primary button5.95:1AA
Secondary button5.40:1AA
Muted text4.85:1AA
Accent5.40:1AA
Destructive6.37:1AA
Dark mode
Text on background18.75:1AAA
Text on card18.75:1AAA
Primary button5.95:1AA
Secondary button5.40:1AA
Muted text5.75:1AA
Accent5.40:1AA
Destructive3.94:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.01 141.563);
  --foreground: oklch(0.157 0.027 140.303);
  --muted: oklch(0.898 0.007 321.613);
  --muted-foreground: oklch(0.482 0.033 321.779);
  --popover: oklch(0.988 0.01 141.563);
  --popover-foreground: oklch(0.157 0.027 140.303);
  --card: oklch(0.988 0.01 141.563);
  --card-foreground: oklch(0.157 0.027 140.303);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.625 0.026 141.474);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.607 0.027 321.713);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.607 0.027 321.713);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.438 0.149 34.643);
  --destructive-foreground: oklch(0.911 0.043 35.946);
  --ring: oklch(0.625 0.026 141.474);
  --chart-1: oklch(0.625 0.026 141.474);
  --chart-2: oklch(0.607 0.027 321.713);
  --chart-3: oklch(0.607 0.027 321.713);
  --chart-4: oklch(0.633 0.025 321.7);
  --chart-5: oklch(0.63 0.039 141.417);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.154 0.021 140.595);
  --foreground: oklch(0.987 0.005 141.578);
  --muted: oklch(0.245 0.009 321.694);
  --muted-foreground: oklch(0.69 0.03 321.714);
  --popover: oklch(0.154 0.021 140.595);
  --popover-foreground: oklch(0.987 0.005 141.578);
  --card: oklch(0.154 0.021 140.595);
  --card-foreground: oklch(0.987 0.005 141.578);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.625 0.026 141.474);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.607 0.027 321.713);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.607 0.027 321.713);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.625 0.22 34.04);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.625 0.026 141.474);
  --chart-1: oklch(0.625 0.026 141.474);
  --chart-2: oklch(0.607 0.027 321.713);
  --chart-3: oklch(0.607 0.027 321.713);
  --chart-4: oklch(0.633 0.025 321.7);
  --chart-5: oklch(0.63 0.039 141.417);
}