Policeman for shadcn/ui

Policeman is a shadcn/ui theme built around a vivid yellow primary color (#b0b80f) with vivid indigo accents (#170fb8). The light mode uses a neutral background (#fefefb). Dark mode keeps the vivid yellow primary (#b0b80f) on a yellow-tinted background (#0d0e07).

Color palette

TokenLightDark
Background
#fefefbwhite
#0d0e07black
Foreground
#040401black
#f9f9f6whitesmoke
Card
#fcfdf7snow
#111108black
Card foreground
#000000black
#fbfbf9snow
Popover
#fefefbwhite
#0d0e07black
Popover foreground
#040401black
#f9f9f6whitesmoke
Primary
#b0b80fyellowgreen
#b0b80fyellowgreen
Primary foreground
#000000black
#000000black
Secondary
#170fb8mediumblue
#170fb8mediumblue
Secondary foreground
#fafaffghostwhite
#fafaffghostwhite
Muted
#dfdfecgainsboro
#131320black
Muted foreground
#5b5b62dimgray
#9d9da4darkgray
Accent
#170fb8mediumblue
#170fb8mediumblue
Accent foreground
#fafaffghostwhite
#fafaffghostwhite
Destructive
#77240dsaddlebrown
#e6491echocolate
Destructive foreground
#f8cbbfpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b0b80fyellowgreen
#b0b80fyellowgreen

Contrast

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

Light mode
Text on background20.28:1AAA
Text on card20.50:1AAA
Primary button9.69:1AAA
Secondary button11.23:1AAA
Muted text5.09:1AA
Accent11.23:1AAA
Destructive6.96:1AA
Dark mode
Text on background18.39:1AAA
Text on card18.28:1AAA
Primary button9.69:1AAA
Secondary button11.23:1AAA
Muted text6.83:1AA
Accent11.23:1AAA
Destructive3.92:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.004 108.777);
  --foreground: oklch(0.104 0.014 110.513);
  --muted: oklch(0.907 0.019 288.323);
  --muted-foreground: oklch(0.473 0.012 288.229);
  --popover: oklch(0.996 0.004 108.777);
  --popover-foreground: oklch(0.104 0.014 110.513);
  --card: oklch(0.991 0.007 108.844);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.751 0.165 113.067);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.368 0.235 267.785);
  --secondary-foreground: oklch(0.987 0.006 288.601);
  --accent: oklch(0.368 0.235 267.785);
  --accent-foreground: oklch(0.987 0.006 288.601);
  --destructive: oklch(0.388 0.121 35.587);
  --destructive-foreground: oklch(0.878 0.054 35.96);
  --ring: oklch(0.751 0.165 113.067);
  --chart-1: oklch(0.751 0.165 113.067);
  --chart-2: oklch(0.368 0.235 267.785);
  --chart-3: oklch(0.368 0.235 267.785);
  --chart-4: oklch(0.388 0.249 267.613);
  --chart-5: oklch(0.759 0.168 113.13);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.16 0.015 110.259);
  --foreground: oklch(0.981 0.004 108.782);
  --muted: oklch(0.193 0.028 285.793);
  --muted-foreground: oklch(0.698 0.011 288.417);
  --popover: oklch(0.16 0.015 110.259);
  --popover-foreground: oklch(0.981 0.004 108.782);
  --card: oklch(0.175 0.017 110.462);
  --card-foreground: oklch(0.987 0.003 108.757);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.751 0.165 113.067);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.368 0.235 267.785);
  --secondary-foreground: oklch(0.987 0.006 288.601);
  --accent: oklch(0.368 0.235 267.785);
  --accent-foreground: oklch(0.987 0.006 288.601);
  --destructive: oklch(0.624 0.2 35.319);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.751 0.165 113.067);
  --chart-1: oklch(0.751 0.165 113.067);
  --chart-2: oklch(0.368 0.235 267.785);
  --chart-3: oklch(0.368 0.235 267.785);
  --chart-4: oklch(0.388 0.249 267.613);
  --chart-5: oklch(0.759 0.168 113.13);
}