Bumper for shadcn/ui

Bumper is a shadcn/ui theme built around a purple primary color (#c247bc) with neutral gray accents (#d0cdd0). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the purple primary (#c247bc) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#030203black
Foreground
#040104black
#ffffffwhite
Card
#fdfcfdwhite
#030203black
Card foreground
#040104black
#ffffffwhite
Popover
#fdfcfdwhite
#030203black
Popover foreground
#040104black
#ffffffwhite
Primary
#c247bcmediumorchid
#c247bcmediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d0cdd0lightgrey
#212121black
Secondary foreground
#373437darkslategray
#bababasilver
Muted
#eee3edlavender
#1c1111black
Muted foreground
#474747darkslategray
#b8b8b8silver
Accent
#d0cdd0lightgrey
#212121black
Accent foreground
#373437darkslategray
#bababasilver
Destructive
#a21101darkred
#fe311borangered
Destructive foreground
#ffdad6mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c247bcmediumorchid
#c247bcmediumorchid

Contrast

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

Light mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button4.26:1AA Large
Secondary button7.80:1AAA
Muted text7.42:1AAA
Accent7.80:1AAA
Destructive6.19:1AA
Dark mode
Text on background20.72:1AAA
Text on card20.72:1AAA
Primary button4.26:1AA Large
Secondary button8.28:1AAA
Muted text9.27:1AAA
Accent8.28:1AAA
Destructive3.70:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 327.065);
  --foreground: oklch(0.086 0.02 328.456);
  --muted: oklch(0.926 0.018 327.219);
  --muted-foreground: oklch(0.399 0 180);
  --popover: oklch(0.992 0.003 327.065);
  --popover-foreground: oklch(0.086 0.02 328.456);
  --card: oklch(0.992 0.003 327.065);
  --card-foreground: oklch(0.086 0.02 328.456);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.608 0.205 329.796);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.852 0.005 327.092);
  --secondary-foreground: oklch(0.329 0.007 327.231);
  --accent: oklch(0.852 0.005 327.092);
  --accent-foreground: oklch(0.329 0.007 327.231);
  --destructive: oklch(0.454 0.178 30.667);
  --destructive-foreground: oklch(0.919 0.041 25.416);
  --ring: oklch(0.608 0.205 329.796);
  --chart-1: oklch(0.608 0.205 329.796);
  --chart-2: oklch(0.852 0.005 327.092);
  --chart-3: oklch(0.852 0.005 327.092);
  --chart-4: oklch(0.876 0.004 327.082);
  --chart-5: oklch(0.611 0.214 329.906);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.012 327.95);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.194 0.019 18.886);
  --muted-foreground: oklch(0.781 0 180);
  --popover: oklch(0.088 0.012 327.95);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.088 0.012 327.95);
  --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.608 0.205 329.796);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.248 0 173.29);
  --secondary-foreground: oklch(0.789 0 171.254);
  --accent: oklch(0.248 0 173.29);
  --accent-foreground: oklch(0.789 0 171.254);
  --destructive: oklch(0.644 0.239 30.52);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.608 0.205 329.796);
  --chart-1: oklch(0.608 0.205 329.796);
  --chart-2: oklch(0.248 0 173.29);
  --chart-3: oklch(0.248 0 173.29);
  --chart-4: oklch(0.28 0 180);
  --chart-5: oklch(0.611 0.214 329.906);
}