Governance for shadcn/ui

Governance is a shadcn/ui theme built around a near-black primary color (#05060a) with muted light blue accents (#babdc9). The light mode uses a neutral background (#f7f8fd). Dark mode keeps the near-black primary (#05060a) on a blue-tinted background (#050710).

Color palette

TokenLightDark
Background
#f7f8fdghostwhite
#050710black
Foreground
#020308black
#fcfcfdwhite
Card
#f7f8fdghostwhite
#050710black
Card foreground
#020308black
#fcfcfdwhite
Popover
#f7f8fdghostwhite
#050710black
Popover foreground
#020308black
#fcfcfdwhite
Primary
#05060ablack
#05060ablack
Primary foreground
#828ebflightslategray
#828ebflightslategray
Secondary
#d2d3d5lightgrey
#26272cdarkslategray
Secondary foreground
#38393ddarkslategray
#bebfc6silver
Muted
#dfe2f1lavender
#0e1120black
Muted foreground
#393b47darkslategray
#b8bbc6silver
Accent
#babdc9silver
#323543darkslategray
Accent foreground
#24262edarkslategray
#cdd0dalightgrey
Destructive
#862e09saddlebrown
#eb510forangered
Destructive foreground
#fbd6c5peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#05060ablack
#05060ablack

Contrast

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

Light mode
Text on background19.41:1AAA
Text on card19.41:1AAA
Primary button6.33:1AA
Secondary button7.67:1AAA
Muted text8.63:1AAA
Accent8.07:1AAA
Destructive6.42:1AA
Dark mode
Text on background19.64:1AAA
Text on card19.64:1AAA
Primary button6.33:1AA
Secondary button8.13:1AAA
Muted text9.77:1AAA
Accent7.88:1AAA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.007 276.074);
  --foreground: oklch(0.102 0.017 269.33);
  --muted: oklch(0.916 0.02 275.87);
  --muted-foreground: oklch(0.356 0.02 275.355);
  --popover: oklch(0.979 0.007 276.074);
  --popover-foreground: oklch(0.102 0.017 269.33);
  --card: oklch(0.979 0.007 276.074);
  --card-foreground: oklch(0.102 0.017 269.33);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.124 0.011 272.801);
  --primary-foreground: oklch(0.655 0.075 274.385);
  --secondary: oklch(0.866 0.004 276.106);
  --secondary-foreground: oklch(0.346 0.007 275.905);
  --accent: oklch(0.8 0.017 275.879);
  --accent-foreground: oklch(0.269 0.015 275.364);
  --destructive: oklch(0.427 0.129 39.661);
  --destructive-foreground: oklch(0.903 0.048 44.525);
  --ring: oklch(0.124 0.011 272.801);
  --chart-1: oklch(0.124 0.011 272.801);
  --chart-2: oklch(0.866 0.004 276.106);
  --chart-3: oklch(0.8 0.017 275.879);
  --chart-4: oklch(0.89 0.003 276.118);
  --chart-5: oklch(0.123 0.012 272.423);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.022 270.435);
  --foreground: oklch(0.992 0.001 276.154);
  --muted: oklch(0.184 0.03 273.418);
  --muted-foreground: oklch(0.793 0.016 275.889);
  --popover: oklch(0.129 0.022 270.435);
  --popover-foreground: oklch(0.992 0.001 276.154);
  --card: oklch(0.129 0.022 270.435);
  --card-foreground: oklch(0.992 0.001 276.154);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.124 0.011 272.801);
  --primary-foreground: oklch(0.655 0.075 274.385);
  --secondary: oklch(0.274 0.009 275.729);
  --secondary-foreground: oklch(0.806 0.01 276.003);
  --accent: oklch(0.332 0.026 275.017);
  --accent-foreground: oklch(0.857 0.015 275.935);
  --destructive: oklch(0.639 0.201 38.705);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.124 0.011 272.801);
  --chart-1: oklch(0.124 0.011 272.801);
  --chart-2: oklch(0.274 0.009 275.729);
  --chart-3: oklch(0.332 0.026 275.017);
  --chart-4: oklch(0.303 0.01 275.709);
  --chart-5: oklch(0.123 0.012 272.423);
}