Capital for shadcn/ui

Capital is a shadcn/ui theme built around a vivid purple primary color (#d515ac) with vivid cyan accents (#15acd5). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#d515ac) on a purple-tinted background (#10040e).

Color palette

TokenLightDark
Background
#ffffffwhite
#10040eblack
Foreground
#11030eblack
#fdfcfdwhite
Card
#ffffffwhite
#10040eblack
Card foreground
#11030eblack
#fdfcfdwhite
Popover
#ffffffwhite
#10040eblack
Popover foreground
#11030eblack
#fdfcfdwhite
Primary
#d515acmediumvioletred
#d515acmediumvioletred
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#acd515yellowgreen
#acd515yellowgreen
Secondary foreground
#161c03black
#161c03black
Muted
#f2f4ecwhitesmoke
#12130bblack
Muted foreground
#52554adarkolivegreen
#b3b5aadarkgray
Accent
#15acd5darkturquoise
#15acd5darkturquoise
Accent foreground
#03161cblack
#03161cblack
Destructive
#a32e0afirebrick
#f04b19orangered
Destructive foreground
#fde9e2mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d515acmediumvioletred
#d515acmediumvioletred

Contrast

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

Light mode
Text on background20.13:1AAA
Text on card20.13:1AAA
Primary button4.61:1AA
Secondary button10.25:1AAA
Muted text6.85:1AA
Accent6.94:1AA
Destructive6.07:1AA
Dark mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button4.61:1AA
Secondary button10.25:1AAA
Muted text8.97:1AAA
Accent6.94:1AA
Destructive3.65:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.135 0.038 335.236);
  --muted: oklch(0.963 0.011 116.539);
  --muted-foreground: oklch(0.442 0.018 117.066);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.135 0.038 335.236);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.135 0.038 335.236);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.595 0.25 340.083);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.815 0.196 122.87);
  --secondary-foreground: oklch(0.213 0.045 120.061);
  --accent: oklch(0.692 0.127 223.872);
  --accent-foreground: oklch(0.188 0.029 217.496);
  --destructive: oklch(0.478 0.159 35.514);
  --destructive-foreground: oklch(0.947 0.024 37.641);
  --ring: oklch(0.595 0.25 340.083);
  --chart-1: oklch(0.595 0.25 340.083);
  --chart-2: oklch(0.815 0.196 122.87);
  --chart-3: oklch(0.692 0.127 223.872);
  --chart-4: oklch(0.855 0.206 122.904);
  --chart-5: oklch(0.601 0.254 340.311);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.032 334.855);
  --foreground: oklch(0.992 0.002 332.646);
  --muted: oklch(0.184 0.016 117.966);
  --muted-foreground: oklch(0.77 0.016 116.7);
  --popover: oklch(0.137 0.032 334.855);
  --popover-foreground: oklch(0.992 0.002 332.646);
  --card: oklch(0.137 0.032 334.855);
  --card-foreground: oklch(0.992 0.002 332.646);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.595 0.25 340.083);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.815 0.196 122.87);
  --secondary-foreground: oklch(0.213 0.045 120.061);
  --accent: oklch(0.692 0.127 223.872);
  --accent-foreground: oklch(0.188 0.029 217.496);
  --destructive: oklch(0.642 0.209 35.776);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.595 0.25 340.083);
  --chart-1: oklch(0.595 0.25 340.083);
  --chart-2: oklch(0.815 0.196 122.87);
  --chart-3: oklch(0.692 0.127 223.872);
  --chart-4: oklch(0.855 0.206 122.904);
  --chart-5: oklch(0.601 0.254 340.311);
}