Capital Compass for shadcn/ui

Capital Compass is a shadcn/ui theme built around a deep blue primary color (#133a6c) with neutral gray accents (#dadada). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep blue primary (#1e4476) on a blue-tinted background (#1a1e25).

Color palette

TokenLightDark
Background
#ffffffwhite
#1a1e25black
Foreground
#010204black
#ffffffwhite
Card
#fcfcfcsnow
#1d1e1fblack
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#1d1e1fblack
Popover foreground
#000000black
#ffffffwhite
Primary
#133a6cmidnightblue
#1e4476midnightblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#25a3d4lightseagreen
#25a3d4lightseagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dcdcdcgainsboro
#393939darkslategray
Muted foreground
#000000black
#9d9f9fdarkgray
Accent
#dadadagainsboro
#212121black
Accent foreground
#000000black
#ffffffwhite
Destructive
#a74315saddlebrown
#ba3010firebrick
Destructive foreground
#fcd6c5peachpuff
#000000black
Border
#e4e5e7gainsboro
#18191bblack
Input
#e4e5e7gainsboro
#18191bblack
Ring
#133a6cmidnightblue
#133a6cmidnightblue

Contrast

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

Light mode
Text on background20.75:1AAA
Text on card20.54:1AAA
Primary button11.36:1AAA
Secondary button2.88:1Fail
Muted text15.26:1AAA
Accent14.98:1AAA
Destructive4.50:1AA
Dark mode
Text on background16.70:1AAA
Text on card16.66:1AAA
Primary button9.76:1AAA
Secondary button2.88:1Fail
Muted text4.34:1AA Large
Accent16.03:1AAA
Destructive3.53:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.087 0.01 246.629);
  --muted: oklch(0.894 0 180);
  --muted-foreground: oklch(0 0 0);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.923 0.002 254.965);
  --input: oklch(0.923 0.002 254.965);
  --primary: oklch(0.35 0.098 256.615);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.672 0.125 230.333);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.888 0 187.595);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.512 0.142 41.806);
  --destructive-foreground: oklch(0.904 0.048 46.334);
  --ring: oklch(0.35 0.098 256.615);
  --chart-1: oklch(0.35 0.098 256.615);
  --chart-2: oklch(0.672 0.125 230.333);
  --chart-3: oklch(0.888 0 187.595);
  --chart-4: oklch(0.694 0.125 229.58);
  --chart-5: oklch(0.351 0.102 256.784);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.234 0.015 264.225);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.344 0 180);
  --muted-foreground: oklch(0.701 0.002 202.182);
  --popover: oklch(0.234 0.002 247.93);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.235 0.003 255.016);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.215 0.003 255.018);
  --input: oklch(0.215 0.003 255.018);
  --primary: oklch(0.387 0.095 256.155);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.672 0.125 230.333);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.249 0 180);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.523 0.179 33.65);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.35 0.098 256.615);
  --chart-1: oklch(0.387 0.095 256.155);
  --chart-2: oklch(0.672 0.125 230.333);
  --chart-3: oklch(0.249 0 180);
  --chart-4: oklch(0.694 0.125 229.58);
  --chart-5: oklch(0.387 0.099 256.289);
}