Camper for shadcn/ui

Camper is a shadcn/ui theme built around a purple primary color (#c153b0) with muted light purple accents (#d1b3cd). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#c153b0) on a purple-tinted background (#0f050e).

Color palette

TokenLightDark
Background
#ffffffwhite
#0f050eblack
Foreground
#090208black
#ffffffwhite
Card
#ffffffwhite
#0f050eblack
Card foreground
#090208black
#ffffffwhite
Popover
#ffffffwhite
#0f050eblack
Popover foreground
#090208black
#ffffffwhite
Primary
#c153b0mediumorchid
#c153b0mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d9c9d7thistle
#1f1e1fblack
Secondary foreground
#422f3fdarkslategray
#b8b7b8silver
Muted
#edd9ealavender
#261223black
Muted foreground
#655d64dimgray
#a29aa1darkgray
Accent
#d1b3cdthistle
#382e37darkslategray
Accent foreground
#331f30darkslategray
#d1c7d0lightgrey
Destructive
#640f02maroon
#fb2e0eorangered
Destructive foreground
#fda89blightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c153b0mediumorchid
#c153b0mediumorchid

Contrast

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

Light mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button4.10:1AA Large
Secondary button7.78:1AAA
Muted text4.75:1AA
Accent7.97:1AAA
Destructive6.96:1AA
Dark mode
Text on background20.02:1AAA
Text on card20.02:1AAA
Primary button4.10:1AA Large
Secondary button8.29:1AAA
Muted text6.42:1AA
Accent7.93:1AAA
Destructive3.81:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.106 0.03 331.601);
  --muted: oklch(0.906 0.032 330.691);
  --muted-foreground: oklch(0.488 0.014 330.618);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.106 0.03 331.601);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.106 0.03 331.601);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.614 0.179 333.708);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.853 0.025 330.618);
  --secondary-foreground: oklch(0.332 0.038 331.658);
  --accent: oklch(0.8 0.05 331.022);
  --accent-foreground: oklch(0.271 0.043 332.147);
  --destructive: oklch(0.327 0.121 32.297);
  --destructive-foreground: oklch(0.812 0.104 29.109);
  --ring: oklch(0.614 0.179 333.708);
  --chart-1: oklch(0.614 0.179 333.708);
  --chart-2: oklch(0.853 0.025 330.618);
  --chart-3: oklch(0.8 0.05 331.022);
  --chart-4: oklch(0.878 0.021 330.546);
  --chart-5: oklch(0.615 0.189 333.892);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.028 332.123);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.219 0.044 332.651);
  --muted-foreground: oklch(0.696 0.013 330.486);
  --popover: oklch(0.138 0.028 332.123);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.138 0.028 332.123);
  --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.614 0.179 333.708);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.237 0.001 330.32);
  --secondary-foreground: oklch(0.781 0.002 330.285);
  --accent: oklch(0.315 0.021 331.072);
  --accent-foreground: oklch(0.84 0.016 330.495);
  --destructive: oklch(0.637 0.24 31.248);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.614 0.179 333.708);
  --chart-1: oklch(0.614 0.179 333.708);
  --chart-2: oklch(0.237 0.001 330.32);
  --chart-3: oklch(0.315 0.021 331.072);
  --chart-4: oklch(0.269 0.002 330.324);
  --chart-5: oklch(0.615 0.189 333.892);
}