First for shadcn/ui

First is a shadcn/ui theme built around a muted deep indigo primary color (#2a2734) with light indigo accents (#bbb3d6). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the muted deep indigo primary (#2a2734) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#000000black
Foreground
#030109black
#ffffffwhite
Card
#f5f4fbwhitesmoke
#030303black
Card foreground
#010105black
#ffffffwhite
Popover
#f5f4fbwhitesmoke
#030303black
Popover foreground
#010105black
#ffffffwhite
Primary
#2a2734darkslategray
#2a2734darkslategray
Primary foreground
#c3bfcfsilver
#c3bfcfsilver
Secondary
#cfcbdclightgrey
#1e1b27black
Secondary foreground
#342f46darkslategray
#b4aec7silver
Muted
#efeff1whitesmoke
#0f0e10black
Muted foreground
#595469dimgray
#9b96abdarkgray
Accent
#bbb3d6lightsteelblue
#29233edarkslategray
Accent foreground
#241e38darkslategray
#c1bad8lightsteelblue
Destructive
#8c1508darkred
#f22d18orangered
Destructive foreground
#fccfcapink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2a2734darkslategray
#2a2734darkslategray

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.06:1AAA
Primary button8.06:1AAA
Secondary button8.06:1AAA
Muted text6.30:1AA
Accent7.97:1AAA
Destructive6.70:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button8.06:1AAA
Secondary button7.89:1AAA
Muted text6.72:1AA
Accent8.03:1AAA
Destructive4.07:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.006 296.964);
  --foreground: oklch(0.089 0.032 296.112);
  --muted: oklch(0.952 0.002 297.032);
  --muted-foreground: oklch(0.458 0.034 295.73);
  --popover: oklch(0.97 0.009 296.903);
  --popover-foreground: oklch(0.07 0.025 296.112);
  --card: oklch(0.97 0.009 296.903);
  --card-foreground: oklch(0.07 0.025 296.112);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.283 0.024 295.551);
  --primary-foreground: oklch(0.813 0.022 296.587);
  --secondary: oklch(0.851 0.024 296.566);
  --secondary-foreground: oklch(0.321 0.042 294.649);
  --accent: oklch(0.784 0.05 295.914);
  --accent-foreground: oklch(0.257 0.048 293.423);
  --destructive: oklch(0.412 0.154 30.537);
  --destructive-foreground: oklch(0.892 0.051 25.565);
  --ring: oklch(0.283 0.024 295.551);
  --chart-1: oklch(0.283 0.024 295.551);
  --chart-2: oklch(0.851 0.024 296.566);
  --chart-3: oklch(0.784 0.05 295.914);
  --chart-4: oklch(0.877 0.02 296.673);
  --chart-5: oklch(0.28 0.029 295.18);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.167 0.004 296.664);
  --muted-foreground: oklch(0.685 0.031 296.27);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.283 0.024 295.551);
  --primary-foreground: oklch(0.813 0.022 296.587);
  --secondary: oklch(0.232 0.023 295.242);
  --secondary-foreground: oklch(0.763 0.036 296.234);
  --accent: oklch(0.276 0.05 293.612);
  --accent-foreground: oklch(0.806 0.042 296.123);
  --destructive: oklch(0.62 0.231 30.518);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.283 0.024 295.551);
  --chart-1: oklch(0.283 0.024 295.551);
  --chart-2: oklch(0.232 0.023 295.242);
  --chart-3: oklch(0.276 0.05 293.612);
  --chart-4: oklch(0.26 0.028 295.118);
  --chart-5: oklch(0.28 0.029 295.18);
}