Adapter for shadcn/ui

Adapter is a shadcn/ui theme built around a deep blue primary color (#1f5875) with deep blue accents (#1f2d75). The light mode uses a neutral background (#fbfdfd). Dark mode keeps the deep blue primary (#1f5875) on a blue-tinted background (#070b0e).

Color palette

TokenLightDark
Background
#fbfdfdwhite
#070b0eblack
Foreground
#03090dblack
#f9fafbghostwhite
Card
#fbfdfdwhite
#070b0eblack
Card foreground
#03090dblack
#f9fafbghostwhite
Popover
#fbfdfdwhite
#070b0eblack
Popover foreground
#03090dblack
#f9fafbghostwhite
Primary
#1f5875darkslategray
#1f5875darkslategray
Primary foreground
#d3e8f3lavender
#d3e8f3lavender
Secondary
#1f7567seagreen
#1f7567seagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d1e6e2gainsboro
#192e2bdarkslategray
Muted foreground
#495553darkslategray
#aab6b4darkgray
Accent
#1f2d75midnightblue
#1f2d75midnightblue
Accent foreground
#d3d8f3lavender
#d3d8f3lavender
Destructive
#a70101darkred
#fe2a2acrimson
Destructive foreground
#ffdbdbmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1f5875darkslategray
#1f5875darkslategray

Contrast

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

Light mode
Text on background19.60:1AAA
Text on card19.60:1AAA
Primary button6.10:1AA
Secondary button5.54:1AA
Muted text5.94:1AA
Accent8.78:1AAA
Destructive6.17:1AA
Dark mode
Text on background18.87:1AAA
Text on card18.87:1AAA
Primary button6.10:1AA
Secondary button5.54:1AA
Muted text6.85:1AA
Accent8.78:1AAA
Destructive3.76:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 228.772);
  --foreground: oklch(0.134 0.016 222.992);
  --muted: oklch(0.908 0.022 184.793);
  --muted-foreground: oklch(0.439 0.016 184.456);
  --popover: oklch(0.993 0.002 228.772);
  --popover-foreground: oklch(0.134 0.016 222.992);
  --card: oklch(0.993 0.002 228.772);
  --card-foreground: oklch(0.134 0.016 222.992);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.438 0.075 234.108);
  --primary-foreground: oklch(0.919 0.027 229.172);
  --secondary: oklch(0.508 0.083 179.155);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.334 0.124 269.803);
  --accent-foreground: oklch(0.887 0.038 276.635);
  --destructive: oklch(0.459 0.188 29.18);
  --destructive-foreground: oklch(0.922 0.039 17.888);
  --ring: oklch(0.438 0.075 234.108);
  --chart-1: oklch(0.438 0.075 234.108);
  --chart-2: oklch(0.508 0.083 179.155);
  --chart-3: oklch(0.334 0.124 269.803);
  --chart-4: oklch(0.545 0.089 179.069);
  --chart-5: oklch(0.44 0.078 234.537);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.147 0.01 227.811);
  --foreground: oklch(0.985 0.002 228.78);
  --muted: oklch(0.283 0.028 182.566);
  --muted-foreground: oklch(0.767 0.014 184.954);
  --popover: oklch(0.147 0.01 227.811);
  --popover-foreground: oklch(0.985 0.002 228.78);
  --card: oklch(0.147 0.01 227.811);
  --card-foreground: oklch(0.985 0.002 228.78);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.438 0.075 234.108);
  --primary-foreground: oklch(0.919 0.027 229.172);
  --secondary: oklch(0.508 0.083 179.155);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.334 0.124 269.803);
  --accent-foreground: oklch(0.887 0.038 276.635);
  --destructive: oklch(0.641 0.242 27.561);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.438 0.075 234.108);
  --chart-1: oklch(0.438 0.075 234.108);
  --chart-2: oklch(0.508 0.083 179.155);
  --chart-3: oklch(0.334 0.124 269.803);
  --chart-4: oklch(0.545 0.089 179.069);
  --chart-5: oklch(0.44 0.078 234.537);
}