Ballet for shadcn/ui

Ballet is a shadcn/ui theme built around a muted deep violet primary color (#0b080c) with muted deep teal accents (#080c0b). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep violet primary (#0b080c) on a violet-tinted background (#0c070d).

Color palette

TokenLightDark
Background
#ffffffwhite
#0c070dblack
Foreground
#100613black
#f8f6f9whitesmoke
Card
#fcfcfcsnow
#0f0911black
Card foreground
#0d050fblack
#faf9fbghostwhite
Popover
#ffffffwhite
#0c070dblack
Popover foreground
#100613black
#f8f6f9whitesmoke
Primary
#0b080cblack
#0b080cblack
Primary foreground
#aa94b3darkgray
#aa94b3darkgray
Secondary
#0c0b08black
#0c0b08black
Secondary foreground
#b3aa94darkgray
#b3aa94darkgray
Muted
#edeae3linen
#1c1912black
Muted foreground
#5f5d59dimgray
#a6a4a0darkgray
Accent
#080c0bblack
#080c0bblack
Accent foreground
#94b3aadarkgray
#94b3aadarkgray
Destructive
#7d210cmaroon
#e94520orangered
Destructive foreground
#f9cdc3pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0b080cblack
#0b080cblack

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.64:1AAA
Primary button7.19:1AAA
Secondary button8.52:1AAA
Muted text5.48:1AA
Accent8.69:1AAA
Destructive6.92:1AA
Dark mode
Text on background18.58:1AAA
Text on card18.77:1AAA
Primary button7.19:1AAA
Secondary button8.52:1AAA
Muted text7.03:1AAA
Accent8.69:1AAA
Destructive3.93:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.147 0.032 317.025);
  --muted: oklch(0.938 0.01 90.202);
  --muted-foreground: oklch(0.479 0.007 90.222);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.147 0.032 317.025);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.135 0.027 317.632);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.142 0.009 317.255);
  --primary-foreground: oklch(0.696 0.052 317.019);
  --secondary: oklch(0.15 0.006 90.809);
  --secondary-foreground: oklch(0.74 0.033 90.385);
  --accent: oklch(0.15 0.006 177.916);
  --accent-foreground: oklch(0.74 0.036 177.302);
  --destructive: oklch(0.395 0.13 33.769);
  --destructive-foreground: oklch(0.883 0.052 32.799);
  --ring: oklch(0.142 0.009 317.255);
  --chart-1: oklch(0.142 0.009 317.255);
  --chart-2: oklch(0.15 0.006 90.809);
  --chart-3: oklch(0.15 0.006 177.916);
  --chart-4: oklch(0.188 0.009 90.397);
  --chart-5: oklch(0.141 0.01 317.282);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.016 317.393);
  --foreground: oklch(0.975 0.006 317.176);
  --muted: oklch(0.215 0.014 90.43);
  --muted-foreground: oklch(0.72 0.006 90.184);
  --popover: oklch(0.139 0.016 317.393);
  --popover-foreground: oklch(0.975 0.006 317.176);
  --card: oklch(0.151 0.019 316.946);
  --card-foreground: oklch(0.983 0.004 317.181);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.142 0.009 317.255);
  --primary-foreground: oklch(0.696 0.052 317.019);
  --secondary: oklch(0.15 0.006 90.809);
  --secondary-foreground: oklch(0.74 0.033 90.385);
  --accent: oklch(0.15 0.006 177.916);
  --accent-foreground: oklch(0.74 0.036 177.302);
  --destructive: oklch(0.624 0.206 33.751);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.142 0.009 317.255);
  --chart-1: oklch(0.142 0.009 317.255);
  --chart-2: oklch(0.15 0.006 90.809);
  --chart-3: oklch(0.15 0.006 177.916);
  --chart-4: oklch(0.188 0.009 90.397);
  --chart-5: oklch(0.141 0.01 317.282);
}