Criminal for shadcn/ui

Criminal is a shadcn/ui theme built around a muted light yellow primary color (#efece6) with muted light green accents (#edefe6). The light mode uses a neutral background (#fcfbf8). Dark mode keeps the muted light yellow primary (#efece6) on a yellow-tinted background (#100c05).

Color palette

TokenLightDark
Background
#fcfbf8snow
#100c05black
Foreground
#040301black
#faf8f5whitesmoke
Card
#fcfbf8snow
#100c05black
Card foreground
#040301black
#faf8f5whitesmoke
Popover
#fcfbf8snow
#100c05black
Popover foreground
#040301black
#faf8f5whitesmoke
Primary
#efece6linen
#efece6linen
Primary foreground
#262118black
#262118black
Secondary
#efe8e6linen
#efe8e6linen
Secondary foreground
#64463fdarkolivegreen
#64463fdarkolivegreen
Muted
#f5f1f0whitesmoke
#0f0b0ablack
Muted foreground
#6f605ddimgray
#a29390rosybrown
Accent
#edefe6linen
#edefe6linen
Accent foreground
#232618black
#232618black
Destructive
#c34404chocolate
#fa6419orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#efece6linen
#efece6linen

Contrast

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

Light mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button13.61:1AAA
Secondary button6.96:1AA
Muted text5.32:1AA
Accent13.31:1AAA
Destructive5.07:1AA
Dark mode
Text on background18.36:1AAA
Text on card18.36:1AAA
Primary button13.61:1AAA
Secondary button6.96:1AA
Muted text6.62:1AA
Accent13.31:1AAA
Destructive6.91:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.004 87.442);
  --foreground: oklch(0.099 0.012 93.148);
  --muted: oklch(0.96 0.005 34.309);
  --muted-foreground: oklch(0.504 0.02 34.313);
  --popover: oklch(0.988 0.004 87.442);
  --popover-foreground: oklch(0.099 0.012 93.148);
  --card: oklch(0.988 0.004 87.442);
  --card-foreground: oklch(0.099 0.012 93.148);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.945 0.009 87.469);
  --primary-foreground: oklch(0.251 0.019 87.521);
  --secondary: oklch(0.936 0.009 34.303);
  --secondary-foreground: oklch(0.426 0.044 34.535);
  --accent: oklch(0.949 0.013 115.822);
  --accent-foreground: oklch(0.26 0.025 117.39);
  --destructive: oklch(0.558 0.173 39.966);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.945 0.009 87.469);
  --chart-1: oklch(0.945 0.009 87.469);
  --chart-2: oklch(0.936 0.009 34.303);
  --chart-3: oklch(0.949 0.013 115.822);
  --chart-4: oklch(0.96 0.005 34.308);
  --chart-5: oklch(0.946 0.01 87.475);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.018 89.887);
  --foreground: oklch(0.98 0.005 87.445);
  --muted: oklch(0.155 0.008 34.301);
  --muted-foreground: oklch(0.677 0.018 34.299);
  --popover: oklch(0.158 0.018 89.887);
  --popover-foreground: oklch(0.98 0.005 87.445);
  --card: oklch(0.158 0.018 89.887);
  --card-foreground: oklch(0.98 0.005 87.445);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.945 0.009 87.469);
  --primary-foreground: oklch(0.251 0.019 87.521);
  --secondary: oklch(0.936 0.009 34.303);
  --secondary-foreground: oklch(0.426 0.044 34.535);
  --accent: oklch(0.949 0.013 115.822);
  --accent-foreground: oklch(0.26 0.025 117.39);
  --destructive: oklch(0.687 0.199 41.821);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.945 0.009 87.469);
  --chart-1: oklch(0.945 0.009 87.469);
  --chart-2: oklch(0.936 0.009 34.303);
  --chart-3: oklch(0.949 0.013 115.822);
  --chart-4: oklch(0.96 0.005 34.308);
  --chart-5: oklch(0.946 0.01 87.475);
}