Modern Purple Theme Light for shadcn/ui

Modern Purple Theme Light is a shadcn/ui theme built around a light indigo primary color (#a2a7eb) with neutral gray accents (#cfcfcf). The light mode uses a neutral background (#f5f5f5). Dark mode keeps the light indigo primary (#a2a7eb) on a neutral background (#f5f5f5).

Color palette

TokenLightDark
Background
#f5f5f5whitesmoke
#f5f5f5whitesmoke
Foreground
#5c5c5cdimgray
#5c5c5cdimgray
Card
#f0f0f0whitesmoke
#f0f0f0whitesmoke
Card foreground
#4f4f4fdarkslategray
#4f4f4fdarkslategray
Popover
#edededwhitesmoke
#edededwhitesmoke
Popover foreground
#424242darkslategray
#424242darkslategray
Primary
#a2a7eblightsteelblue
#a2a7eblightsteelblue
Primary foreground
#10144cmidnightblue
#10144cmidnightblue
Secondary
#2d2f53darkslategray
#2d2f53darkslategray
Secondary foreground
#cdcfe4lightgrey
#cdcfe4lightgrey
Muted
#e9e2e2gainsboro
#e9e2e2gainsboro
Muted foreground
#564343darkslategray
#564343darkslategray
Accent
#cfcfcflightgrey
#cfcfcflightgrey
Accent foreground
#363636darkslategray
#363636darkslategray
Destructive
#ae180afirebrick
#ae180afirebrick
Destructive foreground
#feedeclinen
#feedeclinen
Border
#e8e8e8lavender
#e8e8e8lavender
Input
#e0e0e0gainsboro
#e0e0e0gainsboro
Ring
#a2a7eblightsteelblue
#a2a7eblightsteelblue

Contrast

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

Light mode
Text on background6.12:1AA
Text on card7.16:1AAA
Primary button7.58:1AAA
Secondary button8.29:1AAA
Muted text7.22:1AAA
Accent7.72:1AAA
Destructive6.34:1AA
Dark mode
Text on background6.12:1AA
Text on card7.16:1AAA
Primary button7.58:1AAA
Secondary button8.29:1AAA
Muted text7.22:1AAA
Accent7.72:1AAA
Destructive6.34:1AA

CSS variables

Paste this into your globals.css to use Modern Purple Theme Light in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.97 0 180);
  --foreground: oklch(0.474 0 198.435);
  --muted: oklch(0.919 0.007 17.278);
  --muted-foreground: oklch(0.404 0.025 18.259);
  --popover: oklch(0.947 0 180);
  --popover-foreground: oklch(0.38 0 180);
  --card: oklch(0.954 0 180);
  --card-foreground: oklch(0.428 0 180);
  --border: oklch(0.931 0 180);
  --input: oklch(0.908 0 180);
  --primary: oklch(0.751 0.098 280.603);
  --primary-foreground: oklch(0.233 0.101 272.418);
  --secondary: oklch(0.322 0.063 279.109);
  --secondary-foreground: oklch(0.859 0.03 282.504);
  --accent: oklch(0.853 0 168.69);
  --accent-foreground: oklch(0.331 0 180);
  --destructive: oklch(0.48 0.184 30.093);
  --destructive-foreground: oklch(0.96 0.018 23.774);
  --ring: oklch(0.751 0.098 280.603);
  --chart-1: oklch(0.751 0.098 280.603);
  --chart-2: oklch(0.322 0.063 279.109);
  --chart-3: oklch(0.853 0 168.69);
  --chart-4: oklch(0.346 0.069 279.003);
  --chart-5: oklch(0.748 0.102 280.457);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.97 0 180);
  --foreground: oklch(0.474 0 198.435);
  --muted: oklch(0.919 0.007 17.278);
  --muted-foreground: oklch(0.404 0.025 18.259);
  --popover: oklch(0.947 0 180);
  --popover-foreground: oklch(0.38 0 180);
  --card: oklch(0.954 0 180);
  --card-foreground: oklch(0.428 0 180);
  --border: oklch(0.931 0 180);
  --input: oklch(0.908 0 180);
  --primary: oklch(0.751 0.098 280.603);
  --primary-foreground: oklch(0.233 0.101 272.418);
  --secondary: oklch(0.322 0.063 279.109);
  --secondary-foreground: oklch(0.859 0.03 282.504);
  --accent: oklch(0.853 0 168.69);
  --accent-foreground: oklch(0.331 0 180);
  --destructive: oklch(0.48 0.184 30.093);
  --destructive-foreground: oklch(0.96 0.018 23.774);
  --ring: oklch(0.751 0.098 280.603);
  --chart-1: oklch(0.751 0.098 280.603);
  --chart-2: oklch(0.322 0.063 279.109);
  --chart-3: oklch(0.853 0 168.69);
  --chart-4: oklch(0.346 0.069 279.003);
  --chart-5: oklch(0.748 0.102 280.457);
}