Cloakroom for shadcn/ui

Cloakroom is a shadcn/ui theme built around a vivid purple primary color (#8f0f80) with vivid pink accents (#8f0f40). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#8f0f80) on a neutral background (#070307).

Color palette

TokenLightDark
Background
#ffffffwhite
#070307black
Foreground
#040104black
#ffffffwhite
Card
#fcfcfcsnow
#0a050ablack
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#0a050ablack
Popover foreground
#000000black
#ffffffwhite
Primary
#8f0f80darkmagenta
#8f0f80darkmagenta
Primary foreground
#fbd5f6mistyrose
#fbd5f6mistyrose
Secondary
#5e0f8findigo
#5e0f8findigo
Secondary foreground
#ecd5fblavender
#ecd5fblavender
Muted
#dcd7e0gainsboro
#251f28darkslategray
Muted foreground
#493f50darkslategray
#baafc0silver
Accent
#8f0f40brown
#8f0f40brown
Accent foreground
#fbd5e4mistyrose
#fbd5e4mistyrose
Destructive
#9d3607saddlebrown
#f55b14orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8f0f80darkmagenta
#8f0f80darkmagenta

Contrast

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

Light mode
Text on background20.76:1AAA
Text on card20.54:1AAA
Primary button6.25:1AA
Secondary button7.97:1AAA
Muted text7.03:1AAA
Accent6.80:1AA
Destructive7.09:1AAA
Dark mode
Text on background20.47:1AAA
Text on card20.21:1AAA
Primary button6.25:1AA
Secondary button7.97:1AAA
Muted text7.62:1AAA
Accent6.80:1AA
Destructive6.40:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.084 0.024 330.648);
  --muted: oklch(0.886 0.013 312.886);
  --muted-foreground: oklch(0.385 0.032 312.427);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.452 0.192 334.15);
  --primary-foreground: oklch(0.915 0.059 329.865);
  --secondary: oklch(0.386 0.186 306.556);
  --secondary-foreground: oklch(0.905 0.056 312.569);
  --accent: oklch(0.424 0.161 6.31);
  --accent-foreground: oklch(0.91 0.045 352.963);
  --destructive: oklch(0.476 0.146 39.924);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.452 0.192 334.15);
  --chart-1: oklch(0.452 0.192 334.15);
  --chart-2: oklch(0.386 0.186 306.556);
  --chart-3: oklch(0.424 0.161 6.31);
  --chart-4: oklch(0.412 0.2 306.418);
  --chart-5: oklch(0.456 0.196 334.27);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.016 329.925);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.251 0.018 312.509);
  --muted-foreground: oklch(0.768 0.027 312.749);
  --popover: oklch(0.127 0.018 329.943);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.127 0.018 329.943);
  --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.452 0.192 334.15);
  --primary-foreground: oklch(0.915 0.059 329.865);
  --secondary: oklch(0.386 0.186 306.556);
  --secondary-foreground: oklch(0.905 0.056 312.569);
  --accent: oklch(0.424 0.161 6.31);
  --accent-foreground: oklch(0.91 0.045 352.963);
  --destructive: oklch(0.668 0.202 40.184);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.452 0.192 334.15);
  --chart-1: oklch(0.452 0.192 334.15);
  --chart-2: oklch(0.386 0.186 306.556);
  --chart-3: oklch(0.424 0.161 6.31);
  --chart-4: oklch(0.412 0.2 306.418);
  --chart-5: oklch(0.456 0.196 334.27);
}