Lumen for shadcn/ui

Lumen is a shadcn/ui theme built around a violet primary color (#4f2d7f) with muted light violet accents (#dcd5e5). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#4f2d7f) on a violet-tinted background (#0b050f).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b050fblack
Foreground
#000000black
#fdfcfdwhite
Card
#ffffffwhite
#0b050fblack
Card foreground
#000000black
#fdfcfdwhite
Popover
#ffffffwhite
#0b050fblack
Popover foreground
#000000black
#fdfcfdwhite
Primary
#4f2d7fdarkslateblue
#4f2d7fdarkslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#00838fdarkcyan
#00838fdarkcyan
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eae7e4linen
#666666dimgray
Muted foreground
#333333darkslategray
#ffffffwhite
Accent
#dcd5e5gainsboro
#dcd5e5gainsboro
Accent foreground
#4f2d7fdarkslateblue
#4f2d7fdarkslateblue
Destructive
#de002ecrimson
#de002ecrimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#eae7e4linen
#333333darkslategray
Input
#eae7e4linen
#333333darkslategray
Ring
#00838fdarkcyan
#00838fdarkcyan

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button10.42:1AAA
Secondary button4.52:1AA
Muted text10.25:1AAA
Accent7.29:1AAA
Destructive5.06:1AA
Dark mode
Text on background19.66:1AAA
Text on card19.66:1AAA
Primary button10.42:1AAA
Secondary button4.52:1AA
Muted text5.74:1AA
Accent7.29:1AAA
Destructive5.06:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.929 0.005 67.76);
  --muted-foreground: oklch(0.321 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.929 0.005 67.76);
  --input: oklch(0.929 0.005 67.76);
  --primary: oklch(0.385 0.133 299.128);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.557 0.095 206.065);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.883 0.023 305.57);
  --accent-foreground: oklch(0.385 0.133 299.128);
  --destructive: oklch(0.568 0.229 22.944);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.557 0.095 206.065);
  --chart-1: oklch(0.385 0.133 299.128);
  --chart-2: oklch(0.557 0.095 206.065);
  --chart-3: oklch(0.883 0.023 305.57);
  --chart-4: oklch(0.6 0.103 206.17);
  --chart-5: oklch(0.382 0.14 298.609);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.132 0.026 311.008);
  --foreground: oklch(0.991 0.002 311.069);
  --muted: oklch(0.51 0 171.87);
  --muted-foreground: oklch(1 0 180);
  --popover: oklch(0.132 0.026 311.008);
  --popover-foreground: oklch(0.991 0.002 311.069);
  --card: oklch(0.132 0.026 311.008);
  --card-foreground: oklch(0.991 0.002 311.069);
  --border: oklch(0.321 0 180);
  --input: oklch(0.321 0 180);
  --primary: oklch(0.385 0.133 299.128);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.557 0.095 206.065);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.883 0.023 305.57);
  --accent-foreground: oklch(0.385 0.133 299.128);
  --destructive: oklch(0.568 0.229 22.944);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.557 0.095 206.065);
  --chart-1: oklch(0.385 0.133 299.128);
  --chart-2: oklch(0.557 0.095 206.065);
  --chart-3: oklch(0.883 0.023 305.57);
  --chart-4: oklch(0.6 0.103 206.17);
  --chart-5: oklch(0.382 0.14 298.609);
}