Serendipity Midnight for shadcn/ui

Serendipity Midnight is a shadcn/ui theme built around a light blue primary color (#dddfee) with muted deep blue accents (#313659). The light mode uses a blue-tinted background (#161827). Dark mode keeps the light blue primary (#dddfee) on a blue-tinted background (#161827).

Color palette

TokenLightDark
Background
#161827black
#161827black
Foreground
#dddfeelavender
#dddfeelavender
Card
#121421black
#121421black
Card foreground
#eeeff7whitesmoke
#eeeff7whitesmoke
Popover
#10121eblack
#10121eblack
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#dddfeelavender
#dddfeelavender
Primary foreground
#323867darkslategray
#323867darkslategray
Secondary
#303450darkslategray
#303450darkslategray
Secondary foreground
#cfd1e2lightgrey
#cfd1e2lightgrey
Muted
#24252edarkslategray
#24252edarkslategray
Muted foreground
#9ea0b3darkgray
#9ea0b3darkgray
Accent
#313659darkslategray
#313659darkslategray
Accent foreground
#d4d6e7gainsboro
#d4d6e7gainsboro
Destructive
#de3217orangered
#de3217orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#232534darkslategray
#232534darkslategray
Input
#292c3ddarkslategray
#292c3ddarkslategray
Ring
#dddfeelavender
#dddfeelavender

Contrast

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

Light mode
Text on background13.30:1AAA
Text on card15.98:1AAA
Primary button8.33:1AAA
Secondary button8.05:1AAA
Muted text5.89:1AA
Accent8.12:1AAA
Destructive4.61:1AA
Dark mode
Text on background13.30:1AAA
Text on card15.98:1AAA
Primary button8.33:1AAA
Secondary button8.05:1AAA
Muted text5.89:1AA
Accent8.12:1AAA
Destructive4.61:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.214 0.031 277.662);
  --foreground: oklch(0.906 0.022 279.949);
  --muted: oklch(0.267 0.016 279.316);
  --muted-foreground: oklch(0.711 0.027 279.716);
  --popover: oklch(0.186 0.024 277.98);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.196 0.026 277.862);
  --card-foreground: oklch(0.953 0.011 280.155);
  --border: oklch(0.269 0.027 278.554);
  --input: oklch(0.297 0.031 278.471);
  --primary: oklch(0.906 0.022 279.949);
  --primary-foreground: oklch(0.36 0.082 275.822);
  --secondary: oklch(0.333 0.05 277.557);
  --secondary-foreground: oklch(0.865 0.023 279.896);
  --accent: oklch(0.344 0.062 276.906);
  --accent-foreground: oklch(0.881 0.023 279.903);
  --destructive: oklch(0.587 0.211 31.572);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.906 0.022 279.949);
  --chart-1: oklch(0.906 0.022 279.949);
  --chart-2: oklch(0.333 0.05 277.557);
  --chart-3: oklch(0.344 0.062 276.906);
  --chart-4: oklch(0.358 0.055 277.487);
  --chart-5: oklch(0.904 0.023 279.914);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.214 0.031 277.662);
  --foreground: oklch(0.906 0.022 279.949);
  --muted: oklch(0.267 0.016 279.316);
  --muted-foreground: oklch(0.711 0.027 279.716);
  --popover: oklch(0.186 0.024 277.98);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.196 0.026 277.862);
  --card-foreground: oklch(0.953 0.011 280.155);
  --border: oklch(0.269 0.027 278.554);
  --input: oklch(0.297 0.031 278.471);
  --primary: oklch(0.906 0.022 279.949);
  --primary-foreground: oklch(0.36 0.082 275.822);
  --secondary: oklch(0.333 0.05 277.557);
  --secondary-foreground: oklch(0.865 0.023 279.896);
  --accent: oklch(0.344 0.062 276.906);
  --accent-foreground: oklch(0.881 0.023 279.903);
  --destructive: oklch(0.587 0.211 31.572);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.906 0.022 279.949);
  --chart-1: oklch(0.906 0.022 279.949);
  --chart-2: oklch(0.333 0.05 277.557);
  --chart-3: oklch(0.344 0.062 276.906);
  --chart-4: oklch(0.358 0.055 277.487);
  --chart-5: oklch(0.904 0.023 279.914);
}