Shocked Purple for shadcn/ui

Shocked Purple is a shadcn/ui theme built around a vivid violet primary color (#6c0cbb) with vivid purple accents (#bb0cb2). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#6c0cbb) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#ffffffwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#000000black
#ffffffwhite
Primary
#6c0cbbdarkviolet
#6c0cbbdarkviolet
Primary foreground
#fdfaffwhite
#fdfaffwhite
Secondary
#150cbbmediumblue
#150cbbmediumblue
Secondary foreground
#fafaffghostwhite
#fafaffghostwhite
Muted
#cecde5lightgrey
#1b1a32midnightblue
Muted foreground
#383749darkslategray
#b7b6c8silver
Accent
#bb0cb2mediumvioletred
#bb0cb2mediumvioletred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7e1902maroon
#fc461dorangered
Destructive foreground
#fec1b4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6c0cbbdarkviolet
#6c0cbbdarkviolet

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button8.42:1AAA
Secondary button11.20:1AAA
Muted text7.41:1AAA
Accent5.51:1AA
Destructive6.69:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button8.42:1AAA
Secondary button11.20:1AAA
Muted text8.48:1AAA
Accent5.51:1AA
Destructive3.49:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.855 0.034 287.959);
  --muted-foreground: oklch(0.345 0.031 286.941);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.444 0.23 300.466);
  --primary-foreground: oklch(0.989 0.006 310.377);
  --secondary: oklch(0.369 0.24 267.129);
  --secondary-foreground: oklch(0.987 0.006 288.597);
  --accent: oklch(0.553 0.246 330.904);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.387 0.139 33.437);
  --destructive-foreground: oklch(0.863 0.073 32.932);
  --ring: oklch(0.444 0.23 300.466);
  --chart-1: oklch(0.444 0.23 300.466);
  --chart-2: oklch(0.369 0.24 267.129);
  --chart-3: oklch(0.553 0.246 330.904);
  --chart-4: oklch(0.389 0.254 266.969);
  --chart-5: oklch(0.446 0.233 299.944);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.233 0.047 284.449);
  --muted-foreground: oklch(0.784 0.025 288.102);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.444 0.23 300.466);
  --primary-foreground: oklch(0.989 0.006 310.377);
  --secondary: oklch(0.369 0.24 267.129);
  --secondary-foreground: oklch(0.987 0.006 288.597);
  --accent: oklch(0.553 0.246 330.904);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.656 0.224 33.529);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.444 0.23 300.466);
  --chart-1: oklch(0.444 0.23 300.466);
  --chart-2: oklch(0.369 0.24 267.129);
  --chart-3: oklch(0.553 0.246 330.904);
  --chart-4: oklch(0.389 0.254 266.969);
  --chart-5: oklch(0.446 0.233 299.944);
}