Divalent for shadcn/ui

Divalent is a shadcn/ui theme built around a muted blue primary color (#434956) with muted blue accents (#adb8cc). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted blue primary (#434956) on a neutral background (#010204).

Color palette

TokenLightDark
Background
#ffffffwhite
#010204black
Foreground
#000000black
#f9fafbghostwhite
Card
#ffffffwhite
#010204black
Card foreground
#000000black
#f9fafbghostwhite
Popover
#ffffffwhite
#010204black
Popover foreground
#000000black
#f9fafbghostwhite
Primary
#434956darkslategray
#434956darkslategray
Primary foreground
#e2e4e9gainsboro
#e2e4e9gainsboro
Secondary
#c9ced9lightgrey
#2a2e37darkslategray
Secondary foreground
#2e3542darkslategray
#c2c7d1silver
Muted
#f0f1f5whitesmoke
#0a0c0fblack
Muted foreground
#50545edimgray
#a1a6afdarkgray
Accent
#adb8cclightsteelblue
#343d51darkslategray
Accent foreground
#1b212cdarkslategray
#d3d9e3gainsboro
Destructive
#6f0d0cmaroon
#e21b18crimson
Destructive foreground
#f7b6b5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#434956darkslategray
#434956darkslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.08:1AAA
Secondary button7.83:1AAA
Muted text6.73:1AA
Accent8.06:1AAA
Destructive7.08:1AAA
Dark mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button7.08:1AAA
Secondary button8.00:1AAA
Muted text8.00:1AAA
Accent7.63:1AAA
Destructive4.76:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.959 0.005 264.536);
  --muted-foreground: oklch(0.447 0.016 264.397);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.405 0.024 264.261);
  --primary-foreground: oklch(0.92 0.006 264.529);
  --secondary: oklch(0.852 0.016 264.481);
  --secondary-foreground: oklch(0.327 0.026 264.126);
  --accent: oklch(0.78 0.031 264.378);
  --accent-foreground: oklch(0.247 0.022 264.035);
  --destructive: oklch(0.348 0.131 27.986);
  --destructive-foreground: oklch(0.837 0.076 19.906);
  --ring: oklch(0.405 0.024 264.261);
  --chart-1: oklch(0.405 0.024 264.261);
  --chart-2: oklch(0.852 0.016 264.481);
  --chart-3: oklch(0.78 0.031 264.378);
  --chart-4: oklch(0.877 0.014 264.497);
  --chart-5: oklch(0.402 0.03 264.163);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.01 257.57);
  --foreground: oklch(0.984 0.002 264.545);
  --muted: oklch(0.154 0.007 264.329);
  --muted-foreground: oklch(0.724 0.014 264.479);
  --popover: oklch(0.086 0.01 257.57);
  --popover-foreground: oklch(0.984 0.002 264.545);
  --card: oklch(0.086 0.01 257.57);
  --card-foreground: oklch(0.984 0.002 264.545);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.405 0.024 264.261);
  --primary-foreground: oklch(0.92 0.006 264.529);
  --secondary: oklch(0.301 0.018 264.266);
  --secondary-foreground: oklch(0.829 0.015 264.486);
  --accent: oklch(0.361 0.036 263.96);
  --accent-foreground: oklch(0.883 0.015 264.489);
  --destructive: oklch(0.582 0.227 28.603);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.405 0.024 264.261);
  --chart-1: oklch(0.405 0.024 264.261);
  --chart-2: oklch(0.301 0.018 264.266);
  --chart-3: oklch(0.361 0.036 263.96);
  --chart-4: oklch(0.33 0.02 264.253);
  --chart-5: oklch(0.402 0.03 264.163);
}