Protective Midnight Sea for shadcn/ui

Protective Midnight Sea is a shadcn/ui theme built around a muted indigo primary color (#5b5c8f) with muted green accents (#5c8f5b). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the muted indigo primary (#5b5c8f) on an indigo-tinted background (#06060e).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#06060eblack
Foreground
#010104black
#fcfcfdwhite
Card
#f4f4fbwhitesmoke
#070812black
Card foreground
#000000black
#ffffffwhite
Popover
#f8f8fcghostwhite
#06060eblack
Popover foreground
#010104black
#fcfcfdwhite
Primary
#5b5c8fdarkslateblue
#5b5c8fdarkslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#8f5b5cdimgray
#8f5b5cdimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f6efefwhitesmoke
#10090ablack
Muted foreground
#634b4bdimgray
#b49c9drosybrown
Accent
#5c8f5bdimgray
#5c8f5bdimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c23105firebrick
#ea3b06orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e7e7e9lavender
#19191ablack
Input
#e7e7e9lavender
#19191ablack
Ring
#5b5c8fdarkslateblue
#5b5c8fdarkslateblue

Contrast

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

Light mode
Text on background19.63:1AAA
Text on card19.18:1AAA
Primary button6.19:1AA
Secondary button5.47:1AA
Muted text7.00:1AAA
Accent3.78:1AA Large
Destructive5.62:1AA
Dark mode
Text on background19.68:1AAA
Text on card19.97:1AAA
Primary button6.19:1AA
Secondary button5.47:1AA
Muted text7.66:1AAA
Accent3.78:1AA Large
Destructive4.10:1AA Large

CSS variables

Paste this into your globals.css to use Protective Midnight Sea in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.006 285.51);
  --foreground: oklch(0.072 0.02 278.851);
  --muted: oklch(0.957 0.007 16.106);
  --muted-foreground: oklch(0.437 0.033 17.391);
  --popover: oklch(0.98 0.006 285.51);
  --popover-foreground: oklch(0.072 0.02 278.851);
  --card: oklch(0.969 0.009 285.454);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.93 0.002 285.582);
  --input: oklch(0.93 0.002 285.582);
  --primary: oklch(0.497 0.08 282.323);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.53 0.068 18.515);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.601 0.094 143.919);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.536 0.187 34.646);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.497 0.08 282.323);
  --chart-1: oklch(0.497 0.08 282.323);
  --chart-2: oklch(0.53 0.068 18.515);
  --chart-3: oklch(0.601 0.094 143.919);
  --chart-4: oklch(0.554 0.072 18.535);
  --chart-5: oklch(0.489 0.092 281.724);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.02 282.229);
  --foreground: oklch(0.991 0.002 285.582);
  --muted: oklch(0.151 0.012 17.403);
  --muted-foreground: oklch(0.715 0.029 16.703);
  --popover: oklch(0.128 0.02 282.229);
  --popover-foreground: oklch(0.991 0.002 285.582);
  --card: oklch(0.138 0.023 282.021);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.213 0.003 285.369);
  --input: oklch(0.213 0.003 285.369);
  --primary: oklch(0.497 0.08 282.323);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.53 0.068 18.515);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.601 0.094 143.919);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.615 0.217 34.367);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.497 0.08 282.323);
  --chart-1: oklch(0.497 0.08 282.323);
  --chart-2: oklch(0.53 0.068 18.515);
  --chart-3: oklch(0.601 0.094 143.919);
  --chart-4: oklch(0.554 0.072 18.535);
  --chart-5: oklch(0.489 0.092 281.724);
}