Spectacular for shadcn/ui

Spectacular is a shadcn/ui theme built around a muted violet primary color (#7b668f) with muted green accents (#7a8f66). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted violet primary (#7b668f) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#ffffffwhite
#050307black
Foreground
#0a0510black
#ffffffwhite
Card
#ffffffwhite
#050307black
Card foreground
#0a0510black
#ffffffwhite
Popover
#ffffffwhite
#050307black
Popover foreground
#0a0510black
#ffffffwhite
Primary
#7b668fslategray
#7b668fslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7a8f66gray
#7a8f66gray
Secondary foreground
#000000black
#000000black
Muted
#e5ecdfgainsboro
#192013black
Muted foreground
#404639darkslategray
#bfc6b9silver
Accent
#7a8f66gray
#7a8f66gray
Accent foreground
#000000black
#000000black
Destructive
#751a0amaroon
#e13214orangered
Destructive foreground
#f9c2b9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7b668fslategray
#7b668fslategray

Contrast

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

Light mode
Text on background20.15:1AAA
Text on card20.15:1AAA
Primary button5.08:1AA
Secondary button5.95:1AA
Muted text8.08:1AAA
Accent5.95:1AA
Destructive7.02:1AAA
Dark mode
Text on background20.55:1AAA
Text on card20.55:1AAA
Primary button5.08:1AA
Secondary button5.95:1AA
Muted text9.52:1AAA
Accent5.95:1AA
Destructive4.48:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.13 0.029 308.936);
  --muted: oklch(0.935 0.019 129.343);
  --muted-foreground: oklch(0.384 0.023 129.771);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.13 0.029 308.936);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.13 0.029 308.936);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.545 0.068 307.8);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.623 0.065 130.314);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.623 0.065 130.314);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.372 0.128 32.292);
  --destructive-foreground: oklch(0.861 0.064 29.923);
  --ring: oklch(0.545 0.068 307.8);
  --chart-1: oklch(0.545 0.068 307.8);
  --chart-2: oklch(0.623 0.065 130.314);
  --chart-3: oklch(0.623 0.065 130.314);
  --chart-4: oklch(0.649 0.066 130.275);
  --chart-5: oklch(0.54 0.08 307.539);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.018 310.455);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.233 0.026 130.431);
  --muted-foreground: oklch(0.817 0.019 129.374);
  --popover: oklch(0.105 0.018 310.455);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.105 0.018 310.455);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.545 0.068 307.8);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.623 0.065 130.314);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.623 0.065 130.314);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.594 0.214 32.047);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.545 0.068 307.8);
  --chart-1: oklch(0.545 0.068 307.8);
  --chart-2: oklch(0.623 0.065 130.314);
  --chart-3: oklch(0.623 0.065 130.314);
  --chart-4: oklch(0.649 0.066 130.275);
  --chart-5: oklch(0.54 0.08 307.539);
}