Criminal for shadcn/ui

Criminal is a shadcn/ui theme built around a yellow primary color (#d2d788) with indigo accents (#8e88d7). The light mode uses a neutral background (#ffffff). Dark mode keeps the yellow primary (#d2d788) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#111202black
#f9faf5whitesmoke
Card
#fcfcfcsnow
#030303black
Card foreground
#0d0e02black
#fbfbf8snow
Popover
#ffffffwhite
#000000black
Popover foreground
#111202black
#f9faf5whitesmoke
Primary
#d2d788burlywood
#d2d788burlywood
Primary foreground
#21220bblack
#21220bblack
Secondary
#8e88d7mediumpurple
#8e88d7mediumpurple
Secondary foreground
#0d0b22black
#0d0b22black
Muted
#d9d8eegainsboro
#121127black
Muted foreground
#4c4b5ddarkslategray
#a3a2b4darkgray
Accent
#8e88d7mediumpurple
#8e88d7mediumpurple
Accent foreground
#0d0b22black
#0d0b22black
Destructive
#7a2301maroon
#ef4401orangered
Destructive foreground
#ffc5aepeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d2d788burlywood
#d2d788burlywood

Contrast

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

Light mode
Text on background18.89:1AAA
Text on card19.01:1AAA
Primary button10.68:1AAA
Secondary button6.13:1AA
Muted text6.06:1AA
Accent6.13:1AA
Destructive6.70:1AA
Dark mode
Text on background20.02:1AAA
Text on card19.94:1AAA
Primary button10.68:1AAA
Secondary button6.13:1AA
Muted text7.38:1AAA
Accent6.13:1AA
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.176 0.032 112.296);
  --muted: oklch(0.889 0.031 288.823);
  --muted-foreground: oklch(0.421 0.031 288.065);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.176 0.032 112.296);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.156 0.028 111.917);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.859 0.101 111.607);
  --primary-foreground: oklch(0.246 0.038 112.314);
  --secondary: oklch(0.665 0.116 285.838);
  --secondary-foreground: oklch(0.169 0.046 283.25);
  --accent: oklch(0.665 0.116 285.838);
  --accent-foreground: oklch(0.169 0.046 283.25);
  --destructive: oklch(0.39 0.127 38.151);
  --destructive-foreground: oklch(0.869 0.074 42.585);
  --ring: oklch(0.859 0.101 111.607);
  --chart-1: oklch(0.859 0.101 111.607);
  --chart-2: oklch(0.665 0.116 285.838);
  --chart-3: oklch(0.665 0.116 285.838);
  --chart-4: oklch(0.698 0.104 286.433);
  --chart-5: oklch(0.865 0.107 111.703);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.006 109.593);
  --muted: oklch(0.192 0.044 284.427);
  --muted-foreground: oklch(0.718 0.027 288.771);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.983 0.006 109.593);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.988 0.004 109.554);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.859 0.101 111.607);
  --primary-foreground: oklch(0.246 0.038 112.314);
  --secondary: oklch(0.665 0.116 285.838);
  --secondary-foreground: oklch(0.169 0.046 283.25);
  --accent: oklch(0.665 0.116 285.838);
  --accent-foreground: oklch(0.169 0.046 283.25);
  --destructive: oklch(0.632 0.215 36.254);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.859 0.101 111.607);
  --chart-1: oklch(0.859 0.101 111.607);
  --chart-2: oklch(0.665 0.116 285.838);
  --chart-3: oklch(0.665 0.116 285.838);
  --chart-4: oklch(0.698 0.104 286.433);
  --chart-5: oklch(0.865 0.107 111.703);
}