A Touch of Lilac Theme (No Italics) for shadcn/ui

A Touch of Lilac Theme (No Italics) is a shadcn/ui theme built around a near-white primary color (#ffffff) with muted deep violet accents (#4f385c). The light mode uses a violet-tinted background (#261b2c). Dark mode keeps the near-white primary (#ffffff) on a violet-tinted background (#261b2c).

Color palette

TokenLightDark
Background
#261b2cdarkslategray
#261b2cdarkslategray
Foreground
#f5f2f8whitesmoke
#f5f2f8whitesmoke
Card
#211726black
#211726black
Card foreground
#ffffffwhite
#ffffffwhite
Popover
#1e1523black
#1e1523black
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#302833darkslategray
#302833darkslategray
Muted foreground
#b0a4b7darkgray
#b0a4b7darkgray
Accent
#4f385cdarkslategray
#4f385cdarkslategray
Accent foreground
#e5dceagainsboro
#e5dceagainsboro
Destructive
#e9260corangered
#e9260corangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#322a37darkslategray
#322a37darkslategray
Input
#3a3040darkslategray
#3a3040darkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background14.81:1AAA
Text on card17.26:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.96:1AA
Accent7.65:1AAA
Destructive4.43:1AA Large
Dark mode
Text on background14.81:1AAA
Text on card17.26:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.96:1AA
Accent7.65:1AAA
Destructive4.43:1AA Large

CSS variables

Paste this into your globals.css to use A Touch of Lilac Theme (No Italics) in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.244 0.035 313.401);
  --foreground: oklch(0.964 0.009 308.36);
  --muted: oklch(0.291 0.022 313.803);
  --muted-foreground: oklch(0.734 0.031 313.986);
  --popover: oklch(0.214 0.029 313.466);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.225 0.031 313.442);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.299 0.027 313.723);
  --input: oklch(0.328 0.031 313.707);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.382 0.065 313.241);
  --accent-foreground: oklch(0.906 0.02 314.096);
  --destructive: oklch(0.598 0.228 30.821);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.382 0.065 313.241);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.244 0.035 313.401);
  --foreground: oklch(0.964 0.009 308.36);
  --muted: oklch(0.291 0.022 313.803);
  --muted-foreground: oklch(0.734 0.031 313.986);
  --popover: oklch(0.214 0.029 313.466);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.225 0.031 313.442);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.299 0.027 313.723);
  --input: oklch(0.328 0.031 313.707);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.382 0.065 313.241);
  --accent-foreground: oklch(0.906 0.02 314.096);
  --destructive: oklch(0.598 0.228 30.821);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.382 0.065 313.241);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}