Unlawful for shadcn/ui

Unlawful is a shadcn/ui theme built around a vivid purple primary color (#fb83f7) with vivid green accents (#83fb87). The light mode uses a neutral background (#fdf7fd). Dark mode keeps the vivid purple primary (#fb83f7) on a purple-tinted background (#0f050f).

Color palette

TokenLightDark
Background
#fdf7fdsnow
#0f050fblack
Foreground
#090109black
#f8f6f8whitesmoke
Card
#fcf3fblavenderblush
#130713black
Card foreground
#040104black
#fbf9fbsnow
Popover
#fcf3fblavenderblush
#130713black
Popover foreground
#040104black
#fbf9fbsnow
Primary
#fb83f7violet
#fb83f7violet
Primary foreground
#4a0248indigo
#4a0248indigo
Secondary
#83fb87lightgreen
#83fb87lightgreen
Secondary foreground
#024a05darkgreen
#024a05darkgreen
Muted
#daecdagainsboro
#132513black
Muted foreground
#455445darkslategray
#abbaabdarkgray
Accent
#83fb87lightgreen
#83fb87lightgreen
Accent foreground
#024a05darkgreen
#024a05darkgreen
Destructive
#8c2208darkred
#f3532btomato
Destructive foreground
#fcd4cabisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fb83f7violet
#fb83f7violet

Contrast

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

Light mode
Text on background19.49:1AAA
Text on card19.12:1AAA
Primary button6.97:1AA
Secondary button8.13:1AAA
Muted text6.52:1AA
Accent8.13:1AAA
Destructive6.56:1AA
Dark mode
Text on background18.59:1AAA
Text on card18.82:1AAA
Primary button6.97:1AA
Secondary button8.13:1AAA
Muted text7.92:1AAA
Accent8.13:1AAA
Destructive3.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.01 326.627);
  --foreground: oklch(0.106 0.033 328.429);
  --muted: oklch(0.925 0.031 146.245);
  --muted-foreground: oklch(0.429 0.031 145.891);
  --popover: oklch(0.973 0.015 326.671);
  --popover-foreground: oklch(0.084 0.026 328.429);
  --card: oklch(0.973 0.015 326.671);
  --card-foreground: oklch(0.084 0.026 328.429);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.783 0.2 328.519);
  --primary-foreground: oklch(0.288 0.128 329.91);
  --secondary: oklch(0.892 0.189 144.435);
  --secondary-foreground: oklch(0.356 0.117 142.953);
  --accent: oklch(0.892 0.189 144.435);
  --accent-foreground: oklch(0.356 0.117 142.953);
  --destructive: oklch(0.424 0.145 34.07);
  --destructive-foreground: oklch(0.901 0.047 34.34);
  --ring: oklch(0.783 0.2 328.519);
  --chart-1: oklch(0.783 0.2 328.519);
  --chart-2: oklch(0.892 0.189 144.435);
  --chart-3: oklch(0.892 0.189 144.435);
  --chart-4: oklch(0.902 0.169 144.716);
  --chart-5: oklch(0.784 0.206 328.569);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.029 328.061);
  --foreground: oklch(0.976 0.004 326.572);
  --muted: oklch(0.244 0.041 144.902);
  --muted-foreground: oklch(0.773 0.027 146.235);
  --popover: oklch(0.152 0.033 328.204);
  --popover-foreground: oklch(0.984 0.002 326.562);
  --card: oklch(0.152 0.033 328.204);
  --card-foreground: oklch(0.984 0.002 326.562);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.783 0.2 328.519);
  --primary-foreground: oklch(0.288 0.128 329.91);
  --secondary: oklch(0.892 0.189 144.435);
  --secondary-foreground: oklch(0.356 0.117 142.953);
  --accent: oklch(0.892 0.189 144.435);
  --accent-foreground: oklch(0.356 0.117 142.953);
  --destructive: oklch(0.655 0.203 34.835);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.783 0.2 328.519);
  --chart-1: oklch(0.783 0.2 328.519);
  --chart-2: oklch(0.892 0.189 144.435);
  --chart-3: oklch(0.892 0.189 144.435);
  --chart-4: oklch(0.902 0.169 144.716);
  --chart-5: oklch(0.784 0.206 328.569);
}