Trapdoor for shadcn/ui

Trapdoor is a shadcn/ui theme built around a yellow primary color (#cfb987) with green accents (#c1cf87). The light mode uses a neutral background (#fdfdfb). Dark mode keeps the yellow primary (#cfb987) on a neutral background (#070603).

Color palette

TokenLightDark
Background
#fdfdfbsnow
#070603black
Foreground
#090701black
#fcfbf8snow
Card
#fdfdfbsnow
#070603black
Card foreground
#090701black
#fcfbf8snow
Popover
#fdfdfbsnow
#070603black
Popover foreground
#090701black
#fcfbf8snow
Primary
#cfb987tan
#cfb987tan
Primary foreground
#1a150ablack
#1a150ablack
Secondary
#cf9587rosybrown
#cf9587rosybrown
Secondary foreground
#1a0d0ablack
#1a0d0ablack
Muted
#edddd9gainsboro
#261612black
Muted foreground
#6d5954dimgray
#ab9792rosybrown
Accent
#c1cf87tan
#c1cf87tan
Accent foreground
#161a0ablack
#161a0ablack
Destructive
#c50202firebrick
#fd1c1cred
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cfb987tan
#cfb987tan

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button9.49:1AAA
Secondary button7.51:1AAA
Muted text4.96:1AA
Accent10.56:1AAA
Destructive6.21:1AA
Dark mode
Text on background19.57:1AAA
Text on card19.57:1AAA
Primary button9.49:1AAA
Secondary button7.51:1AAA
Muted text6.27:1AA
Accent10.56:1AAA
Destructive3.92:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 87.43);
  --foreground: oklch(0.127 0.021 94.98);
  --muted: oklch(0.909 0.019 34.297);
  --muted-foreground: oklch(0.484 0.028 34.354);
  --popover: oklch(0.994 0.002 87.43);
  --popover-foreground: oklch(0.127 0.021 94.98);
  --card: oklch(0.994 0.002 87.43);
  --card-foreground: oklch(0.127 0.021 94.98);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.793 0.071 87.43);
  --primary-foreground: oklch(0.198 0.021 87.256);
  --secondary: oklch(0.723 0.074 34.533);
  --secondary-foreground: oklch(0.177 0.022 34.656);
  --accent: oklch(0.827 0.096 117.765);
  --accent-foreground: oklch(0.208 0.028 118.188);
  --destructive: oklch(0.517 0.212 29.145);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.793 0.071 87.43);
  --chart-1: oklch(0.793 0.071 87.43);
  --chart-2: oklch(0.723 0.074 34.533);
  --chart-3: oklch(0.827 0.096 117.765);
  --chart-4: oklch(0.748 0.066 34.469);
  --chart-5: oklch(0.797 0.076 87.385);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.011 91.719);
  --foreground: oklch(0.987 0.003 87.438);
  --muted: oklch(0.221 0.029 34.682);
  --muted-foreground: oklch(0.691 0.025 34.309);
  --popover: oklch(0.122 0.011 91.719);
  --popover-foreground: oklch(0.987 0.003 87.438);
  --card: oklch(0.122 0.011 91.719);
  --card-foreground: oklch(0.987 0.003 87.438);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.793 0.071 87.43);
  --primary-foreground: oklch(0.198 0.021 87.256);
  --secondary: oklch(0.723 0.074 34.533);
  --secondary-foreground: oklch(0.177 0.022 34.656);
  --accent: oklch(0.827 0.096 117.765);
  --accent-foreground: oklch(0.208 0.028 118.188);
  --destructive: oklch(0.631 0.248 28.334);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.793 0.071 87.43);
  --chart-1: oklch(0.793 0.071 87.43);
  --chart-2: oklch(0.723 0.074 34.533);
  --chart-3: oklch(0.827 0.096 117.765);
  --chart-4: oklch(0.748 0.066 34.469);
  --chart-5: oklch(0.797 0.076 87.385);
}