Anarchy for shadcn/ui

Anarchy is a shadcn/ui theme built around a muted light orange primary color (#f3f2f1) with muted light cyan accents (#f1f3f3). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light orange primary (#f3f2f1) on an orange-tinted background (#0b0604).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0604black
Foreground
#150904black
#faf6f5whitesmoke
Card
#ffffffwhite
#0b0604black
Card foreground
#150904black
#faf6f5whitesmoke
Popover
#ffffffwhite
#0b0604black
Popover foreground
#150904black
#faf6f5whitesmoke
Primary
#f3f2f1whitesmoke
#f3f2f1whitesmoke
Primary foreground
#605652dimgray
#605652dimgray
Secondary
#f1f3f3whitesmoke
#f1f3f3whitesmoke
Secondary foreground
#525d60dimgray
#525d60dimgray
Muted
#eef4f7whitesmoke
#080f11black
Muted foreground
#586d74dimgray
#8ba0a7darkgray
Accent
#f1f3f3whitesmoke
#f1f3f3whitesmoke
Accent foreground
#525d60dimgray
#525d60dimgray
Destructive
#8c3c0dsaddlebrown
#db5d14chocolate
Destructive foreground
#fbe0d0blanchedalmond
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f3f2f1whitesmoke
#f3f2f1whitesmoke

Contrast

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

Light mode
Text on background19.57:1AAA
Text on card19.57:1AAA
Primary button6.36:1AA
Secondary button6.08:1AA
Muted text4.91:1AA
Accent6.08:1AA
Destructive6.04:1AA
Dark mode
Text on background18.77:1AAA
Text on card18.77:1AAA
Primary button6.36:1AA
Secondary button6.08:1AA
Muted text7.07:1AAA
Accent6.08:1AA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.156 0.026 45.828);
  --muted: oklch(0.964 0.008 221.379);
  --muted-foreground: oklch(0.519 0.028 221.95);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.156 0.026 45.828);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.156 0.026 45.828);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.961 0.002 41.29);
  --primary-foreground: oklch(0.462 0.015 41.087);
  --secondary: oklch(0.962 0.002 221.32);
  --secondary-foreground: oklch(0.469 0.014 221.622);
  --accent: oklch(0.962 0.002 221.32);
  --accent-foreground: oklch(0.469 0.014 221.622);
  --destructive: oklch(0.457 0.122 45.197);
  --destructive-foreground: oklch(0.924 0.036 52.072);
  --ring: oklch(0.961 0.002 41.29);
  --chart-1: oklch(0.961 0.002 41.29);
  --chart-2: oklch(0.962 0.002 221.32);
  --chart-3: oklch(0.962 0.002 221.32);
  --chart-4: oklch(0.985 0.001 221.311);
  --chart-5: oklch(0.961 0.002 41.284);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.013 47.28);
  --foreground: oklch(0.976 0.004 41.269);
  --muted: oklch(0.162 0.012 221.969);
  --muted-foreground: oklch(0.691 0.026 221.714);
  --popover: oklch(0.129 0.013 47.28);
  --popover-foreground: oklch(0.976 0.004 41.269);
  --card: oklch(0.129 0.013 47.28);
  --card-foreground: oklch(0.976 0.004 41.269);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.961 0.002 41.29);
  --primary-foreground: oklch(0.462 0.015 41.087);
  --secondary: oklch(0.962 0.002 221.32);
  --secondary-foreground: oklch(0.469 0.014 221.622);
  --accent: oklch(0.962 0.002 221.32);
  --accent-foreground: oklch(0.469 0.014 221.622);
  --destructive: oklch(0.631 0.175 44.337);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.961 0.002 41.29);
  --chart-1: oklch(0.961 0.002 41.29);
  --chart-2: oklch(0.962 0.002 221.32);
  --chart-3: oklch(0.962 0.002 221.32);
  --chart-4: oklch(0.985 0.001 221.311);
  --chart-5: oklch(0.961 0.002 41.284);
}