Publicity for shadcn/ui

Publicity is a shadcn/ui theme built around a vivid violet primary color (#a165fb) with muted light violet accents (#c5bcd2). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the vivid violet primary (#a165fb) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#000000black
Foreground
#000000black
#fcfcfdwhite
Card
#f7f4fawhitesmoke
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#f7f4fawhitesmoke
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#a165fbmediumpurple
#a165fbmediumpurple
Primary foreground
#000000black
#000000black
Secondary
#d8d4ddgainsboro
#171519black
Secondary foreground
#3e3847darkslategray
#afa9b7darkgray
Muted
#efecf3whitesmoke
#0f0c13black
Muted foreground
#5d5766dimgray
#9f99a8darkgray
Accent
#c5bcd2silver
#2d2734darkslategray
Accent foreground
#2c2537darkslategray
#c5bfcfsilver
Destructive
#a21710firebrick
#d11e15firebrick
Destructive foreground
#fde9e8linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a165fbmediumpurple
#a165fbmediumpurple

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.29:1AAA
Primary button5.76:1AA
Secondary button7.73:1AAA
Muted text5.95:1AA
Accent8.06:1AAA
Destructive6.71:1AA
Dark mode
Text on background20.48:1AAA
Text on card20.67:1AAA
Primary button5.76:1AA
Secondary button7.94:1AAA
Muted text7.03:1AAA
Accent8.05:1AAA
Destructive5.37:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 304.26);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.948 0.01 304.196);
  --muted-foreground: oklch(0.467 0.025 303.574);
  --popover: oklch(0.971 0.009 304.216);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.971 0.009 304.216);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.643 0.215 298.603);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.876 0.013 304.131);
  --secondary-foreground: oklch(0.354 0.027 303.234);
  --accent: oklch(0.81 0.031 303.797);
  --accent-foreground: oklch(0.281 0.033 302.645);
  --destructive: oklch(0.459 0.174 29.16);
  --destructive-foreground: oklch(0.949 0.022 21.189);
  --ring: oklch(0.643 0.215 298.603);
  --chart-1: oklch(0.643 0.215 298.603);
  --chart-2: oklch(0.876 0.013 304.131);
  --chart-3: oklch(0.81 0.031 303.797);
  --chart-4: oklch(0.901 0.01 304.18);
  --chart-5: oklch(0.641 0.221 298.351);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 304.335);
  --muted: oklch(0.16 0.015 302.969);
  --muted-foreground: oklch(0.693 0.023 303.874);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.643 0.215 298.603);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.199 0.009 303.732);
  --secondary-foreground: oklch(0.743 0.021 303.938);
  --accent: oklch(0.286 0.024 303.127);
  --accent-foreground: oklch(0.815 0.023 303.945);
  --destructive: oklch(0.551 0.211 29.266);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.643 0.215 298.603);
  --chart-1: oklch(0.643 0.215 298.603);
  --chart-2: oklch(0.199 0.009 303.732);
  --chart-3: oklch(0.286 0.024 303.127);
  --chart-4: oklch(0.231 0.011 303.665);
  --chart-5: oklch(0.641 0.221 298.351);
}