Silver for shadcn/ui

Silver is a shadcn/ui theme built around a neutral gray primary color (#454545) with neutral gray accents (#454545). The light mode uses a neutral background (#fcf8f8). Dark mode keeps the neutral gray primary (#454545) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8f8snow
#000000black
Foreground
#080202black
#fdfcfcsnow
Card
#faf5f5whitesmoke
#030303black
Card foreground
#040101black
#ffffffwhite
Popover
#faf5f5whitesmoke
#030303black
Popover foreground
#040101black
#ffffffwhite
Primary
#454545darkslategray
#454545darkslategray
Primary foreground
#dededegainsboro
#dededegainsboro
Secondary
#454545darkslategray
#454545darkslategray
Secondary foreground
#dededegainsboro
#dededegainsboro
Muted
#f5eaealinen
#150a0ablack
Muted foreground
#474343darkslategray
#bcb8b8silver
Accent
#454545darkslategray
#454545darkslategray
Accent foreground
#dededegainsboro
#dededegainsboro
Destructive
#aa1308firebrick
#f41b0bred
Destructive foreground
#fee8e7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#454545darkslategray
#454545darkslategray

Contrast

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

Light mode
Text on background19.54:1AAA
Text on card19.21:1AAA
Primary button7.14:1AAA
Secondary button7.14:1AAA
Muted text8.29:1AAA
Accent7.14:1AAA
Destructive6.36:1AA
Dark mode
Text on background20.50:1AAA
Text on card20.67:1AAA
Primary button7.14:1AAA
Secondary button7.14:1AAA
Muted text9.91:1AAA
Accent7.14:1AAA
Destructive4.20:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 17.22);
  --foreground: oklch(0.104 0.018 20.688);
  --muted: oklch(0.946 0.012 17.374);
  --muted-foreground: oklch(0.386 0.006 17.4);
  --popover: oklch(0.973 0.006 17.253);
  --popover-foreground: oklch(0.082 0.014 20.688);
  --card: oklch(0.973 0.006 17.253);
  --card-foreground: oklch(0.082 0.014 20.688);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.39 0 165.964);
  --primary-foreground: oklch(0.9 0 188.746);
  --secondary: oklch(0.39 0 165.964);
  --secondary-foreground: oklch(0.9 0 188.746);
  --accent: oklch(0.39 0 165.964);
  --accent-foreground: oklch(0.9 0 188.746);
  --destructive: oklch(0.471 0.184 29.762);
  --destructive-foreground: oklch(0.949 0.024 22.51);
  --ring: oklch(0.39 0 165.964);
  --chart-1: oklch(0.39 0 165.964);
  --chart-2: oklch(0.39 0 165.964);
  --chart-3: oklch(0.39 0 165.964);
  --chart-4: oklch(0.418 0 173.29);
  --chart-5: oklch(0.386 0.006 17.4);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 17.192);
  --muted: oklch(0.16 0.02 19.534);
  --muted-foreground: oklch(0.786 0.005 17.256);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.39 0 165.964);
  --primary-foreground: oklch(0.9 0 188.746);
  --secondary: oklch(0.39 0 165.964);
  --secondary-foreground: oklch(0.9 0 188.746);
  --accent: oklch(0.39 0 165.964);
  --accent-foreground: oklch(0.9 0 188.746);
  --destructive: oklch(0.613 0.242 29.755);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.39 0 165.964);
  --chart-1: oklch(0.39 0 165.964);
  --chart-2: oklch(0.39 0 165.964);
  --chart-3: oklch(0.39 0 165.964);
  --chart-4: oklch(0.418 0 173.29);
  --chart-5: oklch(0.386 0.006 17.4);
}