Unruly for shadcn/ui

Unruly is a shadcn/ui theme built around a neutral gray primary color (#656567) with neutral gray accents (#656765). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the neutral gray primary (#656567) on a blue-tinted background (#04060b).

Color palette

TokenLightDark
Background
#fbfcfewhite
#04060bblack
Foreground
#050710black
#ffffffwhite
Card
#fbfcfewhite
#04060bblack
Card foreground
#050710black
#ffffffwhite
Popover
#fbfcfewhite
#04060bblack
Popover foreground
#050710black
#ffffffwhite
Primary
#656567dimgray
#656567dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#676565dimgray
#676565dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f5eaedlinen
#150a0dblack
Muted foreground
#5c5c5cdimgray
#a3a3a3darkgray
Accent
#656765dimgray
#656765dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c52611firebrick
#eb2d14orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#656567dimgray
#656567dimgray

Contrast

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

Light mode
Text on background19.57:1AAA
Text on card19.57:1AAA
Primary button5.78:1AA
Secondary button5.78:1AA
Muted text5.70:1AA
Accent5.69:1AA
Destructive5.73:1AA
Dark mode
Text on background20.26:1AAA
Text on card20.26:1AAA
Primary button5.78:1AA
Secondary button5.78:1AA
Muted text7.70:1AAA
Accent5.69:1AA
Destructive4.27:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 272.633);
  --foreground: oklch(0.131 0.021 266.726);
  --muted: oklch(0.947 0.012 1.303);
  --muted-foreground: oklch(0.474 0 198.435);
  --popover: oklch(0.991 0.002 272.633);
  --popover-foreground: oklch(0.131 0.021 266.726);
  --card: oklch(0.991 0.002 272.633);
  --card-foreground: oklch(0.131 0.021 266.726);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.508 0.003 272.606);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.509 0.003 1.107);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.512 0.004 138.338);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.534 0.197 31.001);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.508 0.003 272.606);
  --chart-1: oklch(0.508 0.003 272.606);
  --chart-2: oklch(0.509 0.003 1.107);
  --chart-3: oklch(0.512 0.004 138.338);
  --chart-4: oklch(0.535 0.003 1.108);
  --chart-5: oklch(0.503 0.01 272.44);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.013 267.626);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.161 0.019 4.127);
  --muted-foreground: oklch(0.716 0 165.964);
  --popover: oklch(0.122 0.013 267.626);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.122 0.013 267.626);
  --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.508 0.003 272.606);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.509 0.003 1.107);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.512 0.004 138.338);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.607 0.225 30.974);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.508 0.003 272.606);
  --chart-1: oklch(0.508 0.003 272.606);
  --chart-2: oklch(0.509 0.003 1.107);
  --chart-3: oklch(0.512 0.004 138.338);
  --chart-4: oklch(0.535 0.003 1.108);
  --chart-5: oklch(0.503 0.01 272.44);
}