Lone for shadcn/ui

Lone is a shadcn/ui theme built around a muted green primary color (#4d6246) with muted green accents (#46624d). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#4d6246) on a neutral background (#040703).

Color palette

TokenLightDark
Background
#ffffffwhite
#040703black
Foreground
#080f05black
#ffffffwhite
Card
#ffffffwhite
#040703black
Card foreground
#080f05black
#ffffffwhite
Popover
#ffffffwhite
#040703black
Popover foreground
#080f05black
#ffffffwhite
Primary
#4d6246darkolivegreen
#4d6246darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5c6246darkolivegreen
#5c6246darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f2f5ebwhitesmoke
#12140ablack
Muted foreground
#565850dimgray
#adafa7darkgray
Accent
#46624ddarkslategray
#46624ddarkslategray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#84310bsaddlebrown
#ef7339tomato
Destructive foreground
#fad7c6bisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4d6246darkolivegreen
#4d6246darkolivegreen

Contrast

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

Light mode
Text on background19.42:1AAA
Text on card19.42:1AAA
Primary button6.62:1AA
Secondary button6.35:1AA
Muted text6.53:1AA
Accent6.71:1AA
Destructive6.42:1AA
Dark mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button6.62:1AA
Secondary button6.35:1AA
Muted text8.36:1AAA
Accent6.71:1AA
Destructive7.15:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.158 0.025 136.304);
  --muted: oklch(0.965 0.013 117.324);
  --muted-foreground: oklch(0.457 0.014 117.613);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.158 0.025 136.304);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.158 0.025 136.304);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.472 0.052 137.49);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.484 0.044 118.759);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.468 0.049 151.377);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.428 0.123 41.2);
  --destructive-foreground: oklch(0.904 0.046 46.355);
  --ring: oklch(0.472 0.052 137.49);
  --chart-1: oklch(0.472 0.052 137.49);
  --chart-2: oklch(0.484 0.044 118.759);
  --chart-3: oklch(0.468 0.049 151.377);
  --chart-4: oklch(0.514 0.048 118.777);
  --chart-5: oklch(0.477 0.06 137.552);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.013 136.123);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.186 0.019 118.976);
  --muted-foreground: oklch(0.75 0.012 117.367);
  --popover: oklch(0.121 0.013 136.123);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.121 0.013 136.123);
  --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.472 0.052 137.49);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.484 0.044 118.759);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.468 0.049 151.377);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.692 0.169 43.392);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.472 0.052 137.49);
  --chart-1: oklch(0.472 0.052 137.49);
  --chart-2: oklch(0.484 0.044 118.759);
  --chart-3: oklch(0.468 0.049 151.377);
  --chart-4: oklch(0.514 0.048 118.777);
  --chart-5: oklch(0.477 0.06 137.552);
}