Helpful Bright Midnight for shadcn/ui

Helpful Bright Midnight is a shadcn/ui theme built around a vivid deep blue primary color (#00198a) with near-white accents (#ebebeb). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep blue primary (#00198a) on a blue-tinted background (#06070f).

Color palette

TokenLightDark
Background
#ffffffwhite
#06070fblack
Foreground
#040716black
#ffffffwhite
Card
#ffffffwhite
#06070fblack
Card foreground
#040716black
#ffffffwhite
Popover
#ffffffwhite
#06070fblack
Popover foreground
#040716black
#ffffffwhite
Primary
#00198adarkblue
#00198adarkblue
Primary foreground
#bdc9fflightblue
#bdc9fflightblue
Secondary
#ebebeblinen
#1e1f25black
Secondary foreground
#525252darkslategray
#b3b5c2silver
Muted
#f5efefwhitesmoke
#0a0b10black
Muted foreground
#594f4fdimgray
#a6a8b0darkgray
Accent
#ebebeblinen
#1e1f25black
Accent foreground
#525252darkslategray
#b3b5c2silver
Destructive
#cb2415firebrick
#d42616firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#f0f1f4whitesmoke
#1a1c23black
Input
#f0f1f4whitesmoke
#1a1c23black
Ring
#00198adarkblue
#00198adarkblue

Contrast

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

Light mode
Text on background20.05:1AAA
Text on card20.05:1AAA
Primary button8.60:1AAA
Secondary button6.53:1AA
Muted text6.97:1AA
Accent6.53:1AA
Destructive5.51:1AA
Dark mode
Text on background20.07:1AAA
Text on card20.07:1AAA
Primary button8.60:1AAA
Secondary button8.08:1AAA
Muted text8.29:1AAA
Accent8.08:1AAA
Destructive5.12:1AA

CSS variables

Paste this into your globals.css to use Helpful Bright Midnight in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.134 0.034 268.132);
  --muted: oklch(0.958 0.006 17.267);
  --muted-foreground: oklch(0.438 0.013 17.677);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.134 0.034 268.132);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.134 0.034 268.132);
  --border: oklch(0.959 0.004 276.112);
  --input: oklch(0.959 0.004 276.112);
  --primary: oklch(0.31 0.182 264.045);
  --primary-foreground: oklch(0.845 0.077 274.789);
  --secondary: oklch(0.939 0 180);
  --secondary-foreground: oklch(0.437 0 180);
  --accent: oklch(0.939 0 180);
  --accent-foreground: oklch(0.437 0 180);
  --destructive: oklch(0.544 0.203 30.043);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.31 0.182 264.045);
  --chart-1: oklch(0.31 0.182 264.045);
  --chart-2: oklch(0.939 0 180);
  --chart-3: oklch(0.939 0 180);
  --chart-4: oklch(0.962 0 180);
  --chart-5: oklch(0.31 0.186 263.66);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.133 0.017 271.871);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.15 0.01 275.158);
  --muted-foreground: oklch(0.732 0.012 275.947);
  --popover: oklch(0.133 0.017 271.871);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.133 0.017 271.871);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.227 0.014 275.293);
  --input: oklch(0.227 0.014 275.293);
  --primary: oklch(0.31 0.182 264.045);
  --primary-foreground: oklch(0.845 0.077 274.789);
  --secondary: oklch(0.24 0.012 275.486);
  --secondary-foreground: oklch(0.776 0.018 275.857);
  --accent: oklch(0.24 0.012 275.486);
  --accent-foreground: oklch(0.776 0.018 275.857);
  --destructive: oklch(0.562 0.21 30.05);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.31 0.182 264.045);
  --chart-1: oklch(0.31 0.182 264.045);
  --chart-2: oklch(0.24 0.012 275.486);
  --chart-3: oklch(0.24 0.012 275.486);
  --chart-4: oklch(0.27 0.014 275.44);
  --chart-5: oklch(0.31 0.186 263.66);
}