Dark Violaceous for shadcn/ui

Dark Violaceous is a shadcn/ui theme built around a muted purple primary color (#be90c1) with muted green accents (#92c190). The light mode uses a neutral background (#fbf8fb). Dark mode keeps the muted purple primary (#be90c1) on a purple-tinted background (#0e060e).

Color palette

TokenLightDark
Background
#fbf8fbsnow
#0e060eblack
Foreground
#0d020eblack
#f9f5faghostwhite
Card
#fbf8fbsnow
#0e060eblack
Card foreground
#0d020eblack
#f9f5faghostwhite
Popover
#fbf8fbsnow
#0e060eblack
Popover foreground
#0d020eblack
#f9f5faghostwhite
Primary
#be90c1darkgray
#be90c1darkgray
Primary foreground
#130b14black
#130b14black
Secondary
#92c190darkseagreen
#92c190darkseagreen
Secondary foreground
#0b140bblack
#0b140bblack
Muted
#e2eee2gainsboro
#111d11black
Muted foreground
#525c51dimgray
#a4aea3darkgray
Accent
#92c190darkseagreen
#92c190darkseagreen
Accent foreground
#0b140bblack
#0b140bblack
Destructive
#a81a10firebrick
#ec3e32crimson
Destructive foreground
#fdedeclinen
#ffffffwhite
Border
#e6e0e6gainsboro
#221b22black
Input
#e6e0e6gainsboro
#221b22black
Ring
#be90c1darkgray
#be90c1darkgray

Contrast

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

Light mode
Text on background19.35:1AAA
Text on card19.35:1AAA
Primary button7.32:1AAA
Secondary button9.13:1AAA
Muted text5.85:1AA
Accent9.13:1AAA
Destructive6.56:1AA
Dark mode
Text on background18.50:1AAA
Text on card18.50:1AAA
Primary button7.32:1AAA
Secondary button9.13:1AAA
Muted text7.57:1AAA
Accent9.13:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.005 324.161);
  --foreground: oklch(0.12 0.042 326.312);
  --muted: oklch(0.938 0.021 144);
  --muted-foreground: oklch(0.462 0.021 143.865);
  --popover: oklch(0.983 0.005 324.161);
  --popover-foreground: oklch(0.12 0.042 326.312);
  --card: oklch(0.983 0.005 324.161);
  --card-foreground: oklch(0.12 0.042 326.312);
  --border: oklch(0.912 0.011 324.202);
  --input: oklch(0.912 0.011 324.202);
  --primary: oklch(0.713 0.086 324.792);
  --primary-foreground: oklch(0.165 0.022 324.851);
  --secondary: oklch(0.764 0.084 143.462);
  --secondary-foreground: oklch(0.178 0.021 143.401);
  --accent: oklch(0.764 0.084 143.462);
  --accent-foreground: oklch(0.178 0.021 143.401);
  --destructive: oklch(0.471 0.177 29.611);
  --destructive-foreground: oklch(0.96 0.017 22.422);
  --ring: oklch(0.713 0.086 324.792);
  --chart-1: oklch(0.713 0.086 324.792);
  --chart-2: oklch(0.764 0.084 143.462);
  --chart-3: oklch(0.764 0.084 143.462);
  --chart-4: oklch(0.785 0.076 143.541);
  --chart-5: oklch(0.712 0.095 324.857);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.021 325.046);
  --foreground: oklch(0.975 0.008 324.177);
  --muted: oklch(0.216 0.029 143.303);
  --muted-foreground: oklch(0.738 0.018 143.983);
  --popover: oklch(0.14 0.021 325.046);
  --popover-foreground: oklch(0.975 0.008 324.177);
  --card: oklch(0.14 0.021 325.046);
  --card-foreground: oklch(0.975 0.008 324.177);
  --border: oklch(0.233 0.017 324.548);
  --input: oklch(0.233 0.017 324.548);
  --primary: oklch(0.713 0.086 324.792);
  --primary-foreground: oklch(0.165 0.022 324.851);
  --secondary: oklch(0.764 0.084 143.462);
  --secondary-foreground: oklch(0.178 0.021 143.401);
  --accent: oklch(0.764 0.084 143.462);
  --accent-foreground: oklch(0.178 0.021 143.401);
  --destructive: oklch(0.624 0.212 28.84);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.713 0.086 324.792);
  --chart-1: oklch(0.713 0.086 324.792);
  --chart-2: oklch(0.764 0.084 143.462);
  --chart-3: oklch(0.764 0.084 143.462);
  --chart-4: oklch(0.785 0.076 143.541);
  --chart-5: oklch(0.712 0.095 324.857);
}