Midnight City for shadcn/ui

Midnight City is a shadcn/ui theme built around a vivid light yellow primary color (#ffffd6) with vivid deep violet accents (#2d0368). The light mode uses a violet-tinted background (#0d011e). Dark mode keeps the vivid light yellow primary (#ffffd6) on a violet-tinted background (#0d011e).

Color palette

TokenLightDark
Background
#0d011eblack
#0d011eblack
Foreground
#ffffd6lightgoldenrodyellow
#ffffd6lightgoldenrodyellow
Card
#090114black
#090114black
Card foreground
#fffff0ivory
#fffff0ivory
Popover
#06000fblack
#06000fblack
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#ffffd6lightgoldenrodyellow
#ffffd6lightgoldenrodyellow
Primary foreground
#3d3d00darkolivegreen
#3d3d00darkolivegreen
Secondary
#53532ddarkolivegreen
#53532ddarkolivegreen
Secondary foreground
#e4e4cdgainsboro
#e4e4cdgainsboro
Muted
#25222bdarkslategray
#25222bdarkslategray
Muted foreground
#a49bb0darkgray
#a49bb0darkgray
Accent
#2d0368midnightblue
#2d0368midnightblue
Accent foreground
#c7a1fcplum
#c7a1fcplum
Destructive
#fc3b31tomato
#fc3b31tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#180434black
#180434black
Input
#1f0642midnightblue
#1f0642midnightblue
Ring
#ffffd6lightgoldenrodyellow
#ffffd6lightgoldenrodyellow

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card20.33:1AAA
Primary button11.00:1AAA
Secondary button6.17:1AA
Muted text5.89:1AA
Accent7.49:1AAA
Destructive3.61:1AA Large
Dark mode
Text on background19.74:1AAA
Text on card20.33:1AAA
Primary button11.00:1AAA
Secondary button6.17:1AA
Muted text5.89:1AA
Accent7.49:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.134 0.065 300.397);
  --foreground: oklch(0.99 0.053 107.325);
  --muted: oklch(0.259 0.018 304.093);
  --muted-foreground: oklch(0.704 0.032 304.41);
  --popover: oklch(0.101 0.047 306.518);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.113 0.053 304.481);
  --card-foreground: oklch(0.996 0.02 106.757);
  --border: oklch(0.186 0.086 296.365);
  --input: oklch(0.213 0.103 295.034);
  --primary: oklch(0.99 0.053 107.325);
  --primary-foreground: oklch(0.349 0.076 109.769);
  --secondary: oklch(0.432 0.057 108.563);
  --secondary-foreground: oklch(0.913 0.031 106.989);
  --accent: oklch(0.273 0.149 291.233);
  --accent-foreground: oklch(0.777 0.132 302.604);
  --destructive: oklch(0.649 0.229 28.481);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.99 0.053 107.325);
  --chart-1: oklch(0.99 0.053 107.325);
  --chart-2: oklch(0.432 0.057 108.563);
  --chart-3: oklch(0.273 0.149 291.233);
  --chart-4: oklch(0.467 0.062 108.59);
  --chart-5: oklch(0.991 0.054 107.349);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.065 300.397);
  --foreground: oklch(0.99 0.053 107.325);
  --muted: oklch(0.259 0.018 304.093);
  --muted-foreground: oklch(0.704 0.032 304.41);
  --popover: oklch(0.101 0.047 306.518);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.113 0.053 304.481);
  --card-foreground: oklch(0.996 0.02 106.757);
  --border: oklch(0.186 0.086 296.365);
  --input: oklch(0.213 0.103 295.034);
  --primary: oklch(0.99 0.053 107.325);
  --primary-foreground: oklch(0.349 0.076 109.769);
  --secondary: oklch(0.432 0.057 108.563);
  --secondary-foreground: oklch(0.913 0.031 106.989);
  --accent: oklch(0.273 0.149 291.233);
  --accent-foreground: oklch(0.777 0.132 302.604);
  --destructive: oklch(0.649 0.229 28.481);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.99 0.053 107.325);
  --chart-1: oklch(0.99 0.053 107.325);
  --chart-2: oklch(0.432 0.057 108.563);
  --chart-3: oklch(0.273 0.149 291.233);
  --chart-4: oklch(0.467 0.062 108.59);
  --chart-5: oklch(0.991 0.054 107.349);
}