Dearest for shadcn/ui

Dearest is a shadcn/ui theme built around a muted violet primary color (#af9fc6) with muted light violet accents (#cac3d5). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted violet primary (#af9fc6) on a violet-tinted background (#07050a).

Color palette

TokenLightDark
Background
#ffffffwhite
#07050ablack
Foreground
#07030cblack
#faf9fbghostwhite
Card
#fcfcfcsnow
#0a070eblack
Card foreground
#050208black
#fcfcfdwhite
Popover
#fcfcfcsnow
#0a070eblack
Popover foreground
#050208black
#fcfcfdwhite
Primary
#af9fc6darkgray
#af9fc6darkgray
Primary foreground
#181320black
#181320black
Secondary
#cac3d5thistle
#141217black
Secondary foreground
#312a3cdarkslategray
#aca4b7darkgray
Muted
#d8d6dcgainsboro
#262329darkslategray
Muted foreground
#59575bdimgray
#a5a4a8darkgray
Accent
#cac3d5thistle
#141217black
Accent foreground
#312a3cdarkslategray
#aca4b7darkgray
Destructive
#831907maroon
#e92d0corangered
Destructive foreground
#fcc9c0pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#af9fc6darkgray
#af9fc6darkgray

Contrast

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

Light mode
Text on background20.44:1AAA
Text on card20.17:1AAA
Primary button7.48:1AAA
Secondary button8.03:1AAA
Muted text4.94:1AA
Accent8.03:1AAA
Destructive6.76:1AA
Dark mode
Text on background19.31:1AAA
Text on card19.53:1AAA
Primary button7.48:1AAA
Secondary button7.75:1AAA
Muted text6.24:1AA
Accent7.75:1AAA
Destructive4.34:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.116 0.025 305.977);
  --muted: oklch(0.879 0.009 304.907);
  --muted-foreground: oklch(0.461 0.006 304.865);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.101 0.022 306.212);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.101 0.022 306.212);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.73 0.057 303.96);
  --primary-foreground: oklch(0.2 0.026 303.204);
  --secondary: oklch(0.828 0.027 304.601);
  --secondary-foreground: oklch(0.301 0.034 303.457);
  --accent: oklch(0.828 0.027 304.601);
  --accent-foreground: oklch(0.301 0.034 303.457);
  --destructive: oklch(0.398 0.143 32.141);
  --destructive-foreground: oklch(0.878 0.059 29.862);
  --ring: oklch(0.73 0.057 303.96);
  --chart-1: oklch(0.73 0.057 303.96);
  --chart-2: oklch(0.828 0.027 304.601);
  --chart-3: oklch(0.828 0.027 304.601);
  --chart-4: oklch(0.855 0.022 304.682);
  --chart-5: oklch(0.726 0.064 303.82);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.014 305.661);
  --foreground: oklch(0.983 0.002 305.011);
  --muted: oklch(0.262 0.012 304.422);
  --muted-foreground: oklch(0.721 0.005 304.942);
  --popover: oklch(0.136 0.016 304.693);
  --popover-foreground: oklch(0.992 0.001 305.028);
  --card: oklch(0.136 0.016 304.693);
  --card-foreground: oklch(0.992 0.001 305.028);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.73 0.057 303.96);
  --primary-foreground: oklch(0.2 0.026 303.204);
  --secondary: oklch(0.187 0.01 304.282);
  --secondary-foreground: oklch(0.731 0.029 304.491);
  --accent: oklch(0.187 0.01 304.282);
  --accent-foreground: oklch(0.731 0.029 304.491);
  --destructive: oklch(0.603 0.224 31.744);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.73 0.057 303.96);
  --chart-1: oklch(0.73 0.057 303.96);
  --chart-2: oklch(0.187 0.01 304.282);
  --chart-3: oklch(0.187 0.01 304.282);
  --chart-4: oklch(0.218 0.014 304.182);
  --chart-5: oklch(0.726 0.064 303.82);
}