Loneliness for shadcn/ui

Loneliness is a shadcn/ui theme built around a vivid violet primary color (#841ac7) with vivid green accents (#5cc71a). The light mode uses a neutral background (#fbf7fd). Dark mode keeps the vivid violet primary (#841ac7) on a violet-tinted background (#0b060f).

Color palette

TokenLightDark
Background
#fbf7fdghostwhite
#0b060fblack
Foreground
#0c0410black
#ffffffwhite
Card
#f8f3fbghostwhite
#0e0712black
Card foreground
#09030cblack
#ffffffwhite
Popover
#f8f3fbghostwhite
#0e0712black
Popover foreground
#09030cblack
#ffffffwhite
Primary
#841ac7darkorchid
#841ac7darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5cc71alimegreen
#5cc71alimegreen
Secondary foreground
#081202black
#081202black
Muted
#e4eddegainsboro
#182112black
Muted foreground
#41483cdarkslategray
#bbc3b7silver
Accent
#5cc71alimegreen
#5cc71alimegreen
Accent foreground
#081202black
#081202black
Destructive
#791d06maroon
#f55e38tomato
Destructive foreground
#fbc4b6lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#841ac7darkorchid
#841ac7darkorchid

Contrast

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

Light mode
Text on background19.05:1AAA
Text on card18.69:1AAA
Primary button7.10:1AAA
Secondary button8.74:1AAA
Muted text7.87:1AAA
Accent8.74:1AAA
Destructive6.84:1AA
Dark mode
Text on background20.08:1AAA
Text on card19.84:1AAA
Primary button7.10:1AAA
Secondary button8.74:1AAA
Muted text9.18:1AAA
Accent8.74:1AAA
Destructive6.52:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.008 312.93);
  --foreground: oklch(0.13 0.033 313.149);
  --muted: oklch(0.935 0.022 133.148);
  --muted-foreground: oklch(0.392 0.022 133.383);
  --popover: oklch(0.971 0.012 312.901);
  --popover-foreground: oklch(0.117 0.029 314.684);
  --card: oklch(0.971 0.012 312.901);
  --card-foreground: oklch(0.117 0.029 314.684);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.492 0.237 306.609);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.736 0.217 137.333);
  --secondary-foreground: oklch(0.167 0.038 132.392);
  --accent: oklch(0.736 0.217 137.333);
  --accent-foreground: oklch(0.167 0.038 132.392);
  --destructive: oklch(0.383 0.13 34.243);
  --destructive-foreground: oklch(0.866 0.066 34.419);
  --ring: oklch(0.492 0.237 306.609);
  --chart-1: oklch(0.492 0.237 306.609);
  --chart-2: oklch(0.736 0.217 137.333);
  --chart-3: oklch(0.736 0.217 137.333);
  --chart-4: oklch(0.773 0.228 137.369);
  --chart-5: oklch(0.494 0.242 306.208);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.024 313.015);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.233 0.03 133.999);
  --muted-foreground: oklch(0.807 0.018 133.143);
  --popover: oklch(0.146 0.027 312.108);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.146 0.027 312.108);
  --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.492 0.237 306.609);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.736 0.217 137.333);
  --secondary-foreground: oklch(0.167 0.038 132.392);
  --accent: oklch(0.736 0.217 137.333);
  --accent-foreground: oklch(0.167 0.038 132.392);
  --destructive: oklch(0.673 0.192 35.093);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.492 0.237 306.609);
  --chart-1: oklch(0.492 0.237 306.609);
  --chart-2: oklch(0.736 0.217 137.333);
  --chart-3: oklch(0.736 0.217 137.333);
  --chart-4: oklch(0.773 0.228 137.369);
  --chart-5: oklch(0.494 0.242 306.208);
}