Secondary for shadcn/ui

Secondary is a shadcn/ui theme built around a purple primary color (#d643a7) with red accents (#d6435e). The light mode uses a neutral background (#fdf7fb). Dark mode keeps the purple primary (#d643a7) on a purple-tinted background (#0a0509).

Color palette

TokenLightDark
Background
#fdf7fbsnow
#0a0509black
Foreground
#040103black
#fbf8fasnow
Card
#fdf7fbsnow
#0a0509black
Card foreground
#040103black
#fbf8fasnow
Popover
#fdf7fbsnow
#0a0509black
Popover foreground
#040103black
#fbf8fasnow
Primary
#d643a7palevioletred
#d643a7palevioletred
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#bb43d6mediumorchid
#bb43d6mediumorchid
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ece2eelavender
#1b111dblack
Muted foreground
#474747darkslategray
#b8b8b8silver
Accent
#d6435eindianred
#d6435eindianred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d31103red
#f11404red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d643a7palevioletred
#d643a7palevioletred

Contrast

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

Light mode
Text on background19.64:1AAA
Text on card19.64:1AAA
Primary button4.03:1AA Large
Secondary button4.30:1AA Large
Muted text7.36:1AAA
Accent4.36:1AA Large
Destructive5.45:1AA
Dark mode
Text on background19.17:1AAA
Text on card19.17:1AAA
Primary button4.03:1AA Large
Secondary button4.30:1AA Large
Muted text9.26:1AAA
Accent4.36:1AA Large
Destructive4.33:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 336.722);
  --foreground: oklch(0.084 0.02 337.087);
  --muted: oklch(0.924 0.021 320.011);
  --muted-foreground: oklch(0.399 0 180);
  --popover: oklch(0.982 0.008 336.722);
  --popover-foreground: oklch(0.084 0.02 337.087);
  --card: oklch(0.982 0.008 336.722);
  --card-foreground: oklch(0.084 0.02 337.087);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.622 0.209 343.023);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.608 0.229 319.678);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.598 0.183 14.024);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.549 0.219 29.833);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.622 0.209 343.023);
  --chart-1: oklch(0.622 0.209 343.023);
  --chart-2: oklch(0.608 0.229 319.678);
  --chart-3: oklch(0.598 0.183 14.024);
  --chart-4: oklch(0.629 0.218 319.831);
  --chart-5: oklch(0.625 0.216 343.309);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.016 336.876);
  --foreground: oklch(0.983 0.004 336.647);
  --muted: oklch(0.196 0.03 320.096);
  --muted-foreground: oklch(0.781 0 180);
  --popover: oklch(0.126 0.016 336.876);
  --popover-foreground: oklch(0.983 0.004 336.647);
  --card: oklch(0.126 0.016 336.876);
  --card-foreground: oklch(0.983 0.004 336.647);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.622 0.209 343.023);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.608 0.229 319.678);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.598 0.183 14.024);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.606 0.243 29.775);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.622 0.209 343.023);
  --chart-1: oklch(0.622 0.209 343.023);
  --chart-2: oklch(0.608 0.229 319.678);
  --chart-3: oklch(0.598 0.183 14.024);
  --chart-4: oklch(0.629 0.218 319.831);
  --chart-5: oklch(0.625 0.216 343.309);
}