Hubcap for shadcn/ui

Hubcap is a shadcn/ui theme built around a vivid deep purple primary color (#720174) with vivid deep pink accents (#74013d). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep purple primary (#720174) on a neutral background (#080208).

Color palette

TokenLightDark
Background
#ffffffwhite
#080208black
Foreground
#040104black
#fbf9fbsnow
Card
#fcfcfcsnow
#0b040cblack
Card foreground
#000000black
#fdfcfdwhite
Popover
#ffffffwhite
#080208black
Popover foreground
#040104black
#fbf9fbsnow
Primary
#720174purple
#720174purple
Primary foreground
#fda9feviolet
#fda9feviolet
Secondary
#390174indigo
#390174indigo
Secondary foreground
#d2a9feplum
#d2a9feplum
Muted
#ebe9eclavender
#141316black
Muted foreground
#423a4bdarkslategray
#bcb4c5silver
Accent
#74013dmaroon
#74013dmaroon
Accent foreground
#fea9d5lightpink
#fea9d5lightpink
Destructive
#ce3009firebrick
#f65931tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#720174purple
#720174purple

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.21:1AA
Secondary button7.58:1AAA
Muted text8.96:1AAA
Accent6.52:1AA
Destructive5.19:1AA
Dark mode
Text on background19.57:1AAA
Text on card19.80:1AAA
Primary button6.21:1AA
Secondary button7.58:1AAA
Muted text9.23:1AAA
Accent6.52:1AA
Destructive6.40:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.085 0.023 326.952);
  --muted: oklch(0.936 0.005 307.731);
  --muted-foreground: oklch(0.363 0.031 306.786);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.085 0.023 326.952);
  --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.39 0.179 327.498);
  --primary-foreground: oklch(0.844 0.145 326.2);
  --secondary: oklch(0.3 0.163 295.203);
  --secondary-foreground: oklch(0.802 0.125 305.934);
  --accent: oklch(0.364 0.147 358.803);
  --accent-foreground: oklch(0.831 0.113 347.531);
  --destructive: oklch(0.557 0.199 33.426);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.39 0.179 327.498);
  --chart-1: oklch(0.39 0.179 327.498);
  --chart-2: oklch(0.3 0.163 295.203);
  --chart-3: oklch(0.364 0.147 358.803);
  --chart-4: oklch(0.327 0.178 294.715);
  --chart-5: oklch(0.393 0.182 327.505);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.023 326.582);
  --foreground: oklch(0.984 0.004 325.126);
  --muted: oklch(0.189 0.007 307.36);
  --muted-foreground: oklch(0.782 0.026 307.405);
  --popover: oklch(0.109 0.023 326.582);
  --popover-foreground: oklch(0.984 0.004 325.126);
  --card: oklch(0.125 0.027 326.553);
  --card-foreground: oklch(0.992 0.002 325.113);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.39 0.179 327.498);
  --primary-foreground: oklch(0.844 0.145 326.2);
  --secondary: oklch(0.3 0.163 295.203);
  --secondary-foreground: oklch(0.802 0.125 305.934);
  --accent: oklch(0.364 0.147 358.803);
  --accent-foreground: oklch(0.831 0.113 347.531);
  --destructive: oklch(0.669 0.2 34.966);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.39 0.179 327.498);
  --chart-1: oklch(0.39 0.179 327.498);
  --chart-2: oklch(0.3 0.163 295.203);
  --chart-3: oklch(0.364 0.147 358.803);
  --chart-4: oklch(0.327 0.178 294.715);
  --chart-5: oklch(0.393 0.182 327.505);
}