Dearest for shadcn/ui

Dearest is a shadcn/ui theme built around an indigo primary color (#472f98) with green accents (#80982f). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the indigo primary (#472f98) on a neutral background (#040307).

Color palette

TokenLightDark
Background
#fcfbfewhite
#040307black
Foreground
#000000black
#faf9fbghostwhite
Card
#f8f7fdghostwhite
#06040bblack
Card foreground
#000000black
#fcfcfdwhite
Popover
#fcfbfewhite
#040307black
Popover foreground
#000000black
#faf9fbghostwhite
Primary
#472f98darkslateblue
#472f98darkslateblue
Primary foreground
#fcfbfewhite
#fcfbfewhite
Secondary
#80982folivedrab
#80982folivedrab
Secondary foreground
#000000black
#000000black
Muted
#e2e3degainsboro
#20211cblack
Muted foreground
#6e7557dimgray
#a1a88adarkseagreen
Accent
#80982folivedrab
#80982folivedrab
Accent foreground
#000000black
#000000black
Destructive
#711404maroon
#e22908orangered
Destructive foreground
#fcb7ablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#472f98darkslateblue
#472f98darkslateblue

Contrast

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

Light mode
Text on background20.32:1AAA
Text on card19.66:1AAA
Primary button9.57:1AAA
Secondary button6.45:1AA
Muted text3.73:1AA Large
Accent6.45:1AA
Destructive6.90:1AA
Dark mode
Text on background19.61:1AAA
Text on card19.88:1AAA
Primary button9.57:1AAA
Secondary button6.45:1AA
Muted text6.56:1AA
Accent6.45:1AA
Destructive4.59:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.005 296.997);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.912 0.006 117.194);
  --muted-foreground: oklch(0.549 0.046 118.614);
  --popover: oklch(0.989 0.005 296.997);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.978 0.009 296.913);
  --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.4 0.162 287.366);
  --primary-foreground: oklch(0.99 0.004 297.013);
  --secondary: oklch(0.64 0.133 121.633);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.64 0.133 121.633);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.358 0.129 32.377);
  --destructive-foreground: oklch(0.841 0.082 30.132);
  --ring: oklch(0.4 0.162 287.366);
  --chart-1: oklch(0.4 0.162 287.366);
  --chart-2: oklch(0.64 0.133 121.633);
  --chart-3: oklch(0.64 0.133 121.633);
  --chart-4: oklch(0.676 0.141 121.667);
  --chart-5: oklch(0.397 0.17 286.536);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.017 296.646);
  --foreground: oklch(0.983 0.002 297.047);
  --muted: oklch(0.244 0.008 117.674);
  --muted-foreground: oklch(0.718 0.044 118.177);
  --popover: oklch(0.101 0.017 296.646);
  --popover-foreground: oklch(0.983 0.002 297.047);
  --card: oklch(0.116 0.02 296.57);
  --card-foreground: oklch(0.992 0.001 297.063);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.4 0.162 287.366);
  --primary-foreground: oklch(0.99 0.004 297.013);
  --secondary: oklch(0.64 0.133 121.633);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.64 0.133 121.633);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.589 0.222 31.597);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.4 0.162 287.366);
  --chart-1: oklch(0.4 0.162 287.366);
  --chart-2: oklch(0.64 0.133 121.633);
  --chart-3: oklch(0.64 0.133 121.633);
  --chart-4: oklch(0.676 0.141 121.667);
  --chart-5: oklch(0.397 0.17 286.536);
}