Scary Navy Purple for shadcn/ui

Scary Navy Purple is a shadcn/ui theme built around a vivid violet primary color (#9254f1) with muted light violet accents (#d2c7d6). The light mode uses a violet-tinted background (#eee7f6). Dark mode switches to a vivid deep violet primary (#59047b) on a neutral background (#060307).

Color palette

TokenLightDark
Background
#eee7f6lavender
#060307black
Foreground
#070209black
#faf9fbghostwhite
Card
#f9f5faghostwhite
#09040bblack
Card foreground
#030104black
#fdfcfdwhite
Popover
#f0fdf4honeydew
#060307black
Popover foreground
#98959adarkgray
#faf9fbghostwhite
Primary
#9254f1mediumslateblue
#59047bindigo
Primary foreground
#ffffffwhite
#e8b5fcplum
Secondary
#044019darkgreen
#211924black
Secondary foreground
#4f4752darkslategray
#bdabc4silver
Muted
#ece8edlavender
#161217black
Muted foreground
#605b62dimgray
#a29da4darkgray
Accent
#d2c7d6thistle
#302136darkslategray
Accent foreground
#392e3edarkslategray
#cbb6d3thistle
Destructive
#1c743dforestgreen
#e62214crimson
Destructive foreground
#f0fdf4honeydew
#ffffffwhite
Border
#c6bbd3thistle
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#59047bindigo
#59047bindigo

Contrast

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

Light mode
Text on background17.02:1AAA
Text on card19.21:1AAA
Primary button4.40:1AA Large
Secondary button1.34:1Fail
Muted text5.46:1AA
Accent7.89:1AAA
Destructive5.56:1AA
Dark mode
Text on background19.55:1AAA
Text on card19.83:1AAA
Primary button7.17:1AAA
Secondary button7.95:1AAA
Muted text6.98:1AA
Accent8.02:1AAA
Destructive4.56:1AA

CSS variables

Paste this into your globals.css to use Scary Navy Purple in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.938 0.021 306.834);
  --foreground: oklch(0.102 0.029 319.012);
  --muted: oklch(0.935 0.008 316.583);
  --muted-foreground: oklch(0.477 0.014 316.525);
  --popover: oklch(0.982 0.018 155.826);
  --popover-foreground: oklch(0.675 0.007 316.576);
  --card: oklch(0.974 0.008 316.584);
  --card-foreground: oklch(0.081 0.023 319.012);
  --border: oklch(0.81 0.035 306.275);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.598 0.223 297.017);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.326 0.087 149.441);
  --secondary-foreground: oklch(0.41 0.02 316.465);
  --accent: oklch(0.843 0.023 316.529);
  --accent-foreground: oklch(0.319 0.032 316.311);
  --destructive: oklch(0.494 0.119 151.154);
  --destructive-foreground: oklch(0.982 0.018 155.826);
  --ring: oklch(0.356 0.174 312.185);
  --chart-1: oklch(0.598 0.223 297.017);
  --chart-2: oklch(0.326 0.087 149.441);
  --chart-3: oklch(0.843 0.023 316.529);
  --chart-4: oklch(0.373 0.102 148.936);
  --chart-5: oklch(0.596 0.23 296.667);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.019 318.202);
  --foreground: oklch(0.983 0.004 316.596);
  --muted: oklch(0.188 0.012 316.42);
  --muted-foreground: oklch(0.702 0.012 316.557);
  --popover: oklch(0.107 0.019 318.202);
  --popover-foreground: oklch(0.983 0.004 316.596);
  --card: oklch(0.122 0.022 318.063);
  --card-foreground: oklch(0.991 0.002 316.603);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.356 0.174 312.185);
  --primary-foreground: oklch(0.843 0.111 316.212);
  --secondary: oklch(0.228 0.024 316.299);
  --secondary-foreground: oklch(0.764 0.041 316.451);
  --accent: oklch(0.274 0.044 316.105);
  --accent-foreground: oklch(0.802 0.047 316.439);
  --destructive: oklch(0.592 0.227 29.705);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.356 0.174 312.185);
  --chart-1: oklch(0.356 0.174 312.185);
  --chart-2: oklch(0.228 0.024 316.299);
  --chart-3: oklch(0.274 0.044 316.105);
  --chart-4: oklch(0.259 0.029 316.276);
  --chart-5: oklch(0.358 0.177 311.96);
}