Cognitive Purple Illusionist for shadcn/ui

Cognitive Purple Illusionist is a shadcn/ui theme built around a vivid violet primary color (#a680ff) with deep indigo accents (#32256a). The light mode uses an indigo-tinted background (#171131). Dark mode keeps the vivid violet primary (#a680ff) on an indigo-tinted background (#171131).

Color palette

TokenLightDark
Background
#171131black
#171131black
Foreground
#c9c3e4thistle
#c9c3e4thistle
Card
#140f2ablack
#140f2ablack
Card foreground
#d9d5ecgainsboro
#d9d5ecgainsboro
Popover
#120d26black
#120d26black
Popover foreground
#e9e6f4lavender
#e9e6f4lavender
Primary
#a680ffmediumpurple
#a680ffmediumpurple
Primary foreground
#17004dmidnightblue
#17004dmidnightblue
Secondary
#382d53darkslategray
#382d53darkslategray
Secondary foreground
#d4cde4lightgrey
#d4cde4lightgrey
Muted
#282631darkslategray
#282631darkslategray
Muted foreground
#a4a1b5darkgray
#a4a1b5darkgray
Accent
#32256amidnightblue
#32256amidnightblue
Accent foreground
#d7d2efgainsboro
#d7d2efgainsboro
Destructive
#f25540tomato
#f25540tomato
Destructive foreground
#000000black
#000000black
Border
#231c3fmidnightblue
#231c3fmidnightblue
Input
#29214amidnightblue
#29214amidnightblue
Ring
#a680ffmediumpurple
#a680ffmediumpurple

Contrast

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

Light mode
Text on background10.67:1AAA
Text on card13.01:1AAA
Primary button6.22:1AA
Secondary button8.20:1AAA
Muted text5.90:1AA
Accent8.93:1AAA
Destructive6.13:1AA
Dark mode
Text on background10.67:1AAA
Text on card13.01:1AAA
Primary button6.22:1AA
Secondary button8.20:1AAA
Muted text5.90:1AA
Accent8.93:1AAA
Destructive6.13:1AA

CSS variables

Paste this into your globals.css to use Cognitive Purple Illusionist in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.206 0.061 288.338);
  --foreground: oklch(0.833 0.046 293.784);
  --muted: oklch(0.276 0.019 293.508);
  --muted-foreground: oklch(0.718 0.029 294.061);
  --popover: oklch(0.182 0.049 289.058);
  --popover-foreground: oklch(0.932 0.018 294.457);
  --card: oklch(0.19 0.053 288.793);
  --card-foreground: oklch(0.883 0.032 294.146);
  --border: oklch(0.256 0.064 289.522);
  --input: oklch(0.28 0.073 289.273);
  --primary: oklch(0.691 0.183 295.021);
  --primary-foreground: oklch(0.208 0.123 283.378);
  --secondary: oklch(0.327 0.067 296.317);
  --secondary-foreground: oklch(0.862 0.032 299.408);
  --accent: oklch(0.323 0.114 286.52);
  --accent-foreground: oklch(0.876 0.041 293.957);
  --destructive: oklch(0.658 0.196 30.504);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.691 0.183 295.021);
  --chart-1: oklch(0.691 0.183 295.021);
  --chart-2: oklch(0.327 0.067 296.317);
  --chart-3: oklch(0.323 0.114 286.52);
  --chart-4: oklch(0.352 0.074 296.225);
  --chart-5: oklch(0.688 0.188 294.821);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.206 0.061 288.338);
  --foreground: oklch(0.833 0.046 293.784);
  --muted: oklch(0.276 0.019 293.508);
  --muted-foreground: oklch(0.718 0.029 294.061);
  --popover: oklch(0.182 0.049 289.058);
  --popover-foreground: oklch(0.932 0.018 294.457);
  --card: oklch(0.19 0.053 288.793);
  --card-foreground: oklch(0.883 0.032 294.146);
  --border: oklch(0.256 0.064 289.522);
  --input: oklch(0.28 0.073 289.273);
  --primary: oklch(0.691 0.183 295.021);
  --primary-foreground: oklch(0.208 0.123 283.378);
  --secondary: oklch(0.327 0.067 296.317);
  --secondary-foreground: oklch(0.862 0.032 299.408);
  --accent: oklch(0.323 0.114 286.52);
  --accent-foreground: oklch(0.876 0.041 293.957);
  --destructive: oklch(0.658 0.196 30.504);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.691 0.183 295.021);
  --chart-1: oklch(0.691 0.183 295.021);
  --chart-2: oklch(0.327 0.067 296.317);
  --chart-3: oklch(0.323 0.114 286.52);
  --chart-4: oklch(0.352 0.074 296.225);
  --chart-5: oklch(0.688 0.188 294.821);
}