Uniform for shadcn/ui

Uniform is a shadcn/ui theme built around a neutral gray primary color (#575558) with muted light violet accents (#e2dce5). The light mode uses a neutral background (#fbf6fd). Dark mode keeps the neutral gray primary (#575558) on a neutral background (#060308).

Color palette

TokenLightDark
Background
#fbf6fdghostwhite
#060308black
Foreground
#060109black
#fdfcfdwhite
Card
#fbf6fdghostwhite
#060308black
Card foreground
#060109black
#fdfcfdwhite
Popover
#fbf6fdghostwhite
#060308black
Popover foreground
#060109black
#fdfcfdwhite
Primary
#575558dimgray
#575558dimgray
Primary foreground
#f0eff0whitesmoke
#f0eff0whitesmoke
Secondary
#e2dce5gainsboro
#2b2130darkslategray
Secondary foreground
#4a3d52darkslategray
#c5b7cdsilver
Muted
#e5dceagainsboro
#1e1523black
Muted foreground
#67616bdimgray
#9a949edarkgray
Accent
#e2dce5gainsboro
#2b2130darkslategray
Accent foreground
#4a3d52darkslategray
#c5b7cdsilver
Destructive
#7e2007maroon
#ed3d0corangered
Destructive foreground
#fbc9bbpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#575558dimgray
#575558dimgray

Contrast

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

Light mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button6.43:1AA
Secondary button7.48:1AAA
Muted text4.49:1AA Large
Accent7.48:1AAA
Destructive6.74:1AA
Dark mode
Text on background20.07:1AAA
Text on card20.07:1AAA
Primary button6.43:1AA
Secondary button8.06:1AAA
Muted text5.98:1AA
Accent8.06:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.01 313.542);
  --foreground: oklch(0.098 0.034 316.466);
  --muted: oklch(0.905 0.021 313.462);
  --muted-foreground: oklch(0.502 0.018 313.388);
  --popover: oklch(0.98 0.01 313.542);
  --popover-foreground: oklch(0.098 0.034 316.466);
  --card: oklch(0.98 0.01 313.542);
  --card-foreground: oklch(0.098 0.034 316.466);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.453 0.006 313.521);
  --primary-foreground: oklch(0.954 0.001 313.6);
  --secondary: oklch(0.901 0.014 313.511);
  --secondary-foreground: oklch(0.382 0.04 312.963);
  --accent: oklch(0.901 0.014 313.511);
  --accent-foreground: oklch(0.382 0.04 312.963);
  --destructive: oklch(0.395 0.132 34.945);
  --destructive-foreground: oklch(0.877 0.061 35.974);
  --ring: oklch(0.453 0.006 313.521);
  --chart-1: oklch(0.453 0.006 313.521);
  --chart-2: oklch(0.901 0.014 313.511);
  --chart-3: oklch(0.901 0.014 313.511);
  --chart-4: oklch(0.926 0.01 313.537);
  --chart-5: oklch(0.448 0.016 313.393);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.02 315.269);
  --foreground: oklch(0.992 0.001 313.6);
  --muted: oklch(0.214 0.03 312.73);
  --muted-foreground: oklch(0.675 0.017 313.455);
  --popover: oklch(0.105 0.02 315.269);
  --popover-foreground: oklch(0.992 0.001 313.6);
  --card: oklch(0.105 0.02 315.269);
  --card-foreground: oklch(0.992 0.001 313.6);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.453 0.006 313.521);
  --primary-foreground: oklch(0.954 0.001 313.6);
  --secondary: oklch(0.267 0.03 312.916);
  --secondary-foreground: oklch(0.797 0.034 313.342);
  --accent: oklch(0.267 0.03 312.916);
  --accent-foreground: oklch(0.797 0.034 313.342);
  --destructive: oklch(0.624 0.218 34.145);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.453 0.006 313.521);
  --chart-1: oklch(0.453 0.006 313.521);
  --chart-2: oklch(0.267 0.03 312.916);
  --chart-3: oklch(0.267 0.03 312.916);
  --chart-4: oklch(0.296 0.034 312.884);
  --chart-5: oklch(0.448 0.016 313.393);
}