Pendulum for shadcn/ui

Pendulum is a shadcn/ui theme built around a blue primary color (#3871ad) with neutral gray accents (#d6d9db). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the blue primary (#3871ad) on a blue-tinted background (#04080c).

Color palette

TokenLightDark
Background
#fbfcfewhite
#04080cblack
Foreground
#040a10black
#ffffffwhite
Card
#f8fafcghostwhite
#050a10black
Card foreground
#03080cblack
#ffffffwhite
Popover
#fbfcfewhite
#04080cblack
Popover foreground
#040a10black
#ffffffwhite
Primary
#3871adsteelblue
#3871adsteelblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#eaebeblavender
#26292cdarkslategray
Secondary foreground
#505253darkslategray
#bdc2c7silver
Muted
#d7dee5gainsboro
#1a2128black
Muted foreground
#4e5965dimgray
#9aa5b1darkgray
Accent
#d6d9dbgainsboro
#2e353ddarkslategray
Accent foreground
#3b4044darkslategray
#c8ced5lightgrey
Destructive
#a1140cfirebrick
#f03c33crimson
Destructive foreground
#fde4e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3871adsteelblue
#3871adsteelblue

Contrast

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

Light mode
Text on background19.42:1AAA
Text on card19.19:1AAA
Primary button5.08:1AA
Secondary button6.56:1AA
Muted text5.24:1AA
Accent7.37:1AAA
Destructive6.62:1AA
Dark mode
Text on background20.14:1AAA
Text on card19.86:1AAA
Primary button5.08:1AA
Secondary button8.18:1AAA
Muted text6.49:1AA
Accent7.79:1AAA
Destructive3.89:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.002 249.669);
  --foreground: oklch(0.141 0.017 245.37);
  --muted: oklch(0.896 0.012 249.777);
  --muted-foreground: oklch(0.458 0.024 250.109);
  --popover: oklch(0.992 0.002 249.669);
  --popover-foreground: oklch(0.141 0.017 245.37);
  --card: oklch(0.984 0.004 249.688);
  --card-foreground: oklch(0.128 0.015 242.086);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.538 0.112 251.995);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.939 0.001 249.657);
  --secondary-foreground: oklch(0.436 0.003 249.724);
  --accent: oklch(0.883 0.005 249.701);
  --accent-foreground: oklch(0.368 0.01 249.891);
  --destructive: oklch(0.454 0.175 29.306);
  --destructive-foreground: oklch(0.938 0.028 21.279);
  --ring: oklch(0.538 0.112 251.995);
  --chart-1: oklch(0.538 0.112 251.995);
  --chart-2: oklch(0.939 0.001 249.657);
  --chart-3: oklch(0.883 0.005 249.701);
  --chart-4: oklch(0.962 0 249.654);
  --chart-5: oklch(0.539 0.118 252.22);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.013 242.649);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.244 0.017 250.25);
  --muted-foreground: oklch(0.718 0.022 249.92);
  --popover: oklch(0.128 0.013 242.649);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.141 0.016 245.838);
  --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.538 0.112 251.995);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.278 0.008 249.9);
  --secondary-foreground: oklch(0.811 0.009 249.752);
  --accent: oklch(0.326 0.017 250.104);
  --accent-foreground: oklch(0.849 0.012 249.782);
  --destructive: oklch(0.629 0.217 28.233);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.538 0.112 251.995);
  --chart-1: oklch(0.538 0.112 251.995);
  --chart-2: oklch(0.278 0.008 249.9);
  --chart-3: oklch(0.326 0.017 250.104);
  --chart-4: oklch(0.308 0.009 249.91);
  --chart-5: oklch(0.539 0.118 252.22);
}