Affectionate for shadcn/ui

Affectionate is a shadcn/ui theme built around a vivid purple primary color (#b90993) with vivid pink accents (#b9093b). The light mode uses a neutral background (#fefbfd). Dark mode keeps the vivid purple primary (#b90993) on a neutral background (#040103).

Color palette

TokenLightDark
Background
#fefbfdsnow
#040103black
Foreground
#090207black
#ffffffwhite
Card
#fefbfdsnow
#040103black
Card foreground
#090207black
#ffffffwhite
Popover
#fefbfdsnow
#040103black
Popover foreground
#090207black
#ffffffwhite
Primary
#b90993mediumvioletred
#b90993mediumvioletred
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#8709b9darkviolet
#8709b9darkviolet
Secondary foreground
#fcf5ffghostwhite
#fcf5ffghostwhite
Muted
#e9dceflavender
#1d1023black
Muted foreground
#4b3f50darkslategray
#bbafc0silver
Accent
#b9093bfirebrick
#b9093bfirebrick
Accent foreground
#fff5f8snow
#fff5f8snow
Destructive
#a11202darkred
#fb2109red
Destructive foreground
#fedbd7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b90993mediumvioletred
#b90993mediumvioletred

Contrast

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

Light mode
Text on background19.97:1AAA
Text on card19.97:1AAA
Primary button5.96:1AA
Secondary button7.08:1AAA
Muted text7.52:1AAA
Accent6.21:1AA
Destructive6.28:1AA
Dark mode
Text on background20.75:1AAA
Text on card20.75:1AAA
Primary button5.96:1AA
Secondary button7.08:1AAA
Muted text8.67:1AAA
Accent6.21:1AA
Destructive3.93:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 332.68);
  --foreground: oklch(0.106 0.029 333.66);
  --muted: oklch(0.911 0.028 316.518);
  --muted-foreground: oklch(0.386 0.033 316.361);
  --popover: oklch(0.991 0.004 332.68);
  --popover-foreground: oklch(0.106 0.029 333.66);
  --card: oklch(0.991 0.004 332.68);
  --card-foreground: oklch(0.106 0.029 333.66);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.532 0.227 340.612);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.478 0.235 311.796);
  --secondary-foreground: oklch(0.979 0.014 316.567);
  --accent: oklch(0.502 0.197 16.172);
  --accent-foreground: oklch(0.979 0.011 358.021);
  --destructive: oklch(0.452 0.176 30.615);
  --destructive-foreground: oklch(0.919 0.04 25.405);
  --ring: oklch(0.532 0.227 340.612);
  --chart-1: oklch(0.532 0.227 340.612);
  --chart-2: oklch(0.478 0.235 311.796);
  --chart-3: oklch(0.502 0.197 16.172);
  --chart-4: oklch(0.505 0.249 311.716);
  --chart-5: oklch(0.537 0.23 340.827);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.016 333.357);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.202 0.04 315.957);
  --muted-foreground: oklch(0.77 0.028 316.504);
  --popover: oklch(0.086 0.016 333.357);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.086 0.016 333.357);
  --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.532 0.227 340.612);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.478 0.235 311.796);
  --secondary-foreground: oklch(0.979 0.014 316.567);
  --accent: oklch(0.502 0.197 16.172);
  --accent-foreground: oklch(0.979 0.011 358.021);
  --destructive: oklch(0.63 0.246 30.329);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.532 0.227 340.612);
  --chart-1: oklch(0.532 0.227 340.612);
  --chart-2: oklch(0.478 0.235 311.796);
  --chart-3: oklch(0.502 0.197 16.172);
  --chart-4: oklch(0.505 0.249 311.716);
  --chart-5: oklch(0.537 0.23 340.827);
}