Criminal for shadcn/ui

Criminal is a shadcn/ui theme built around a purple primary color (#bc44e4) with muted light purple accents (#d1c2d6). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the purple primary (#bc44e4) on a purple-tinted background (#0c070d).

Color palette

TokenLightDark
Background
#fdfbfewhite
#0c070dblack
Foreground
#030104black
#fdfcfdwhite
Card
#fdfbfewhite
#0c070dblack
Card foreground
#030104black
#fdfcfdwhite
Popover
#fdfbfewhite
#0c070dblack
Popover foreground
#030104black
#fdfcfdwhite
Primary
#bc44e4mediumorchid
#bc44e4mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d1c2d6thistle
#271e29darkslategray
Secondary foreground
#38293ddarkslategray
#c2b2c7silver
Muted
#e6dceagainsboro
#201523black
Muted foreground
#534757darkslategray
#b4a8b8darkgray
Accent
#d1c2d6thistle
#271e29darkslategray
Accent foreground
#38293ddarkslategray
#c2b2c7silver
Destructive
#7a0200maroon
#ff1d19red
Destructive foreground
#ffafadlightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bc44e4mediumorchid
#bc44e4mediumorchid

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button4.13:1AA Large
Secondary button7.99:1AAA
Muted text6.56:1AA
Accent7.99:1AAA
Destructive6.50:1AA
Dark mode
Text on background19.50:1AAA
Text on card19.50:1AAA
Primary button4.13:1AA Large
Secondary button8.04:1AAA
Muted text7.74:1AAA
Accent8.04:1AAA
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 317.757);
  --foreground: oklch(0.085 0.017 319.498);
  --muted: oklch(0.907 0.022 317.724);
  --muted-foreground: oklch(0.416 0.03 317.645);
  --popover: oklch(0.991 0.004 317.757);
  --popover-foreground: oklch(0.085 0.017 319.498);
  --card: oklch(0.991 0.004 317.757);
  --card-foreground: oklch(0.085 0.017 319.498);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.62 0.241 316.273);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.833 0.031 317.702);
  --secondary-foreground: oklch(0.307 0.039 317.54);
  --accent: oklch(0.833 0.031 317.702);
  --accent-foreground: oklch(0.307 0.039 317.54);
  --destructive: oklch(0.366 0.149 29.551);
  --destructive-foreground: oklch(0.83 0.095 20.361);
  --ring: oklch(0.62 0.241 316.273);
  --chart-1: oklch(0.62 0.241 316.273);
  --chart-2: oklch(0.833 0.031 317.702);
  --chart-3: oklch(0.833 0.031 317.702);
  --chart-4: oklch(0.858 0.026 317.713);
  --chart-5: oklch(0.621 0.248 316.152);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.016 317.994);
  --foreground: oklch(0.992 0.002 317.76);
  --muted: oklch(0.216 0.031 317.508);
  --muted-foreground: oklch(0.747 0.026 317.706);
  --popover: oklch(0.139 0.016 317.994);
  --popover-foreground: oklch(0.992 0.002 317.76);
  --card: oklch(0.139 0.016 317.994);
  --card-foreground: oklch(0.992 0.002 317.76);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.62 0.241 316.273);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.25 0.025 317.598);
  --secondary-foreground: oklch(0.784 0.034 317.691);
  --accent: oklch(0.25 0.025 317.598);
  --accent-foreground: oklch(0.784 0.034 317.691);
  --destructive: oklch(0.636 0.25 28.71);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.62 0.241 316.273);
  --chart-1: oklch(0.62 0.241 316.273);
  --chart-2: oklch(0.25 0.025 317.598);
  --chart-3: oklch(0.25 0.025 317.598);
  --chart-4: oklch(0.28 0.029 317.589);
  --chart-5: oklch(0.621 0.248 316.152);
}