Dear for shadcn/ui

Dear is a shadcn/ui theme built around a vivid violet primary color (#8541ec) with vivid green accents (#41ec85). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#8541ec) on a violet-tinted background (#09050f).

Color palette

TokenLightDark
Background
#ffffffwhite
#09050fblack
Foreground
#040209black
#faf9fbghostwhite
Card
#ffffffwhite
#09050fblack
Card foreground
#040209black
#faf9fbghostwhite
Popover
#ffffffwhite
#09050fblack
Popover foreground
#040209black
#faf9fbghostwhite
Primary
#8541ecblueviolet
#8541ecblueviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#ec8541coral
#ec8541coral
Secondary foreground
#000000black
#000000black
Muted
#e7dfdagainsboro
#251d18black
Muted foreground
#565452dimgray
#adaba9darkgray
Accent
#41ec85mediumseagreen
#41ec85mediumseagreen
Accent foreground
#000000black
#000000black
Destructive
#93140bdarkred
#ee2517orangered
Destructive foreground
#fcd7d4mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8541ecblueviolet
#8541ecblueviolet

Contrast

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

Light mode
Text on background20.63:1AAA
Text on card20.63:1AAA
Primary button5.29:1AA
Secondary button8.02:1AAA
Muted text5.73:1AA
Accent13.58:1AAA
Destructive6.73:1AA
Dark mode
Text on background19.21:1AAA
Text on card19.21:1AAA
Primary button5.29:1AA
Secondary button8.02:1AAA
Muted text7.22:1AAA
Accent13.58:1AAA
Destructive4.29:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.096 0.028 305.784);
  --muted: oklch(0.909 0.01 56.275);
  --muted-foreground: oklch(0.447 0.003 56.328);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.096 0.028 305.784);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.096 0.028 305.784);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.558 0.24 295.824);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.718 0.15 51.566);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.835 0.198 152.081);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.426 0.162 29.644);
  --destructive-foreground: oklch(0.909 0.041 22.778);
  --ring: oklch(0.558 0.24 295.824);
  --chart-1: oklch(0.558 0.24 295.824);
  --chart-2: oklch(0.718 0.15 51.566);
  --chart-3: oklch(0.835 0.198 152.081);
  --chart-4: oklch(0.736 0.14 52.478);
  --chart-5: oklch(0.556 0.246 295.358);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.025 303.837);
  --foreground: oklch(0.983 0.003 304.304);
  --muted: oklch(0.239 0.015 55.582);
  --muted-foreground: oklch(0.741 0.003 56.378);
  --popover: oklch(0.13 0.025 303.837);
  --popover-foreground: oklch(0.983 0.003 304.304);
  --card: oklch(0.13 0.025 303.837);
  --card-foreground: oklch(0.983 0.003 304.304);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.558 0.24 295.824);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.718 0.15 51.566);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.835 0.198 152.081);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.607 0.232 29.685);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.558 0.24 295.824);
  --chart-1: oklch(0.558 0.24 295.824);
  --chart-2: oklch(0.718 0.15 51.566);
  --chart-3: oklch(0.835 0.198 152.081);
  --chart-4: oklch(0.736 0.14 52.478);
  --chart-5: oklch(0.556 0.246 295.358);
}