Unlawful for shadcn/ui

Unlawful is a shadcn/ui theme built around a near-black primary color (#080907) with near-black accents (#090708). The light mode uses a neutral background (#fefefb). Dark mode keeps the near-black primary (#080907) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefefbwhite
#000000black
Foreground
#0c0d02black
#fdfdfcwhite
Card
#fcfdf7snow
#030303black
Card foreground
#080901black
#ffffffwhite
Popover
#fefefbwhite
#000000black
Popover foreground
#0c0d02black
#fdfdfcwhite
Primary
#080907black
#080907black
Primary foreground
#aaac95darkgray
#aaac95darkgray
Secondary
#070809black
#070809black
Secondary foreground
#95aaacdarkgray
#95aaacdarkgray
Muted
#dfe2e2gainsboro
#1d2020black
Muted foreground
#3d5051darkslategray
#aec0c2silver
Accent
#090708black
#090708black
Accent foreground
#ac95aadarkgray
#ac95aadarkgray
Destructive
#d10e00red
#f01000red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#080907black
#080907black

Contrast

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

Light mode
Text on background19.30:1AAA
Text on card19.51:1AAA
Primary button8.60:1AAA
Secondary button8.22:1AAA
Muted text6.53:1AA
Accent7.31:1AAA
Destructive5.56:1AA
Dark mode
Text on background20.63:1AAA
Text on card20.67:1AAA
Primary button8.60:1AAA
Secondary button8.22:1AAA
Muted text8.68:1AAA
Accent7.31:1AAA
Destructive4.40: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.995 0.003 110.312);
  --foreground: oklch(0.154 0.026 112.419);
  --muted: oklch(0.91 0.004 203.544);
  --muted-foreground: oklch(0.415 0.023 203.187);
  --popover: oklch(0.995 0.003 110.312);
  --popover-foreground: oklch(0.154 0.026 112.419);
  --card: oklch(0.991 0.007 110.378);
  --card-foreground: oklch(0.134 0.023 112.031);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.136 0.005 110.637);
  --primary-foreground: oklch(0.737 0.032 111.042);
  --secondary: oklch(0.134 0.003 202.931);
  --secondary-foreground: oklch(0.723 0.023 203.317);
  --accent: oklch(0.131 0.006 328.345);
  --accent-foreground: oklch(0.698 0.04 328.639);
  --destructive: oklch(0.544 0.219 29.922);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.136 0.005 110.637);
  --chart-1: oklch(0.136 0.005 110.637);
  --chart-2: oklch(0.134 0.003 202.931);
  --chart-3: oklch(0.131 0.006 328.345);
  --chart-4: oklch(0.173 0.005 203.324);
  --chart-5: oklch(0.137 0.006 110.728);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.994 0.002 110.278);
  --muted: oklch(0.241 0.005 203.4);
  --muted-foreground: oklch(0.794 0.02 203.365);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.994 0.002 110.278);
  --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.136 0.005 110.637);
  --primary-foreground: oklch(0.737 0.032 111.042);
  --secondary: oklch(0.134 0.003 202.931);
  --secondary-foreground: oklch(0.723 0.023 203.317);
  --accent: oklch(0.131 0.006 328.345);
  --accent-foreground: oklch(0.698 0.04 328.639);
  --destructive: oklch(0.602 0.243 29.832);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.136 0.005 110.637);
  --chart-1: oklch(0.136 0.005 110.637);
  --chart-2: oklch(0.134 0.003 202.931);
  --chart-3: oklch(0.131 0.006 328.345);
  --chart-4: oklch(0.173 0.005 203.324);
  --chart-5: oklch(0.137 0.006 110.728);
}