Friendship for shadcn/ui

Friendship is a shadcn/ui theme built around a vivid light green primary color (#f1fedd) with muted green accents (#bdc7ad). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the vivid light green primary (#f1fedd) on a green-tinted background (#080a05).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#080a05black
Foreground
#0f1504black
#ffffffwhite
Card
#fdfdfcwhite
#080a05black
Card foreground
#0f1504black
#ffffffwhite
Popover
#fdfdfcwhite
#080a05black
Popover foreground
#0f1504black
#ffffffwhite
Primary
#f1feddbeige
#f1feddbeige
Primary foreground
#284002darkgreen
#284002darkgreen
Secondary
#d0d4c9lightgrey
#22231fblack
Secondary foreground
#373c2fdarkslategray
#bbbeb7silver
Muted
#e2e7dagainsboro
#202518black
Muted foreground
#44493cdarkslategray
#bec3b6silver
Accent
#bdc7adsilver
#373d2edarkslategray
Accent foreground
#23271bblack
#d0d5c8lightgrey
Destructive
#bd320ffirebrick
#ee522btomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f1feddbeige
#f1feddbeige

Contrast

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

Light mode
Text on background18.29:1AAA
Text on card18.29:1AAA
Primary button10.92:1AAA
Secondary button7.55:1AAA
Muted text7.37:1AAA
Accent8.68:1AAA
Destructive5.80:1AA
Dark mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button10.92:1AAA
Secondary button8.42:1AAA
Muted text8.68:1AAA
Accent7.49:1AAA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 123.678);
  --foreground: oklch(0.184 0.034 125.858);
  --muted: oklch(0.921 0.019 123.943);
  --muted-foreground: oklch(0.396 0.023 124.504);
  --popover: oklch(0.994 0.003 123.678);
  --popover-foreground: oklch(0.184 0.034 125.858);
  --card: oklch(0.994 0.003 123.678);
  --card-foreground: oklch(0.184 0.034 125.858);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.978 0.045 124.337);
  --primary-foreground: oklch(0.339 0.088 129.572);
  --secondary: oklch(0.864 0.016 123.923);
  --secondary-foreground: oklch(0.347 0.023 124.63);
  --accent: oklch(0.815 0.037 124.33);
  --accent-foreground: oklch(0.265 0.024 125.009);
  --destructive: oklch(0.528 0.18 34.057);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.978 0.045 124.337);
  --chart-1: oklch(0.978 0.045 124.337);
  --chart-2: oklch(0.864 0.016 123.923);
  --chart-3: oklch(0.815 0.037 124.33);
  --chart-4: oklch(0.886 0.014 123.871);
  --chart-5: oklch(0.979 0.047 124.359);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.015 123.228);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.256 0.025 125.176);
  --muted-foreground: oklch(0.81 0.019 123.991);
  --popover: oklch(0.142 0.015 123.228);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.142 0.015 123.228);
  --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.978 0.045 124.337);
  --primary-foreground: oklch(0.339 0.088 129.572);
  --secondary: oklch(0.253 0.006 124.016);
  --secondary-foreground: oklch(0.796 0.01 123.826);
  --accent: oklch(0.35 0.026 124.787);
  --accent-foreground: oklch(0.866 0.019 123.97);
  --destructive: oklch(0.646 0.199 34.858);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.978 0.045 124.337);
  --chart-1: oklch(0.978 0.045 124.337);
  --chart-2: oklch(0.253 0.006 124.016);
  --chart-3: oklch(0.35 0.026 124.787);
  --chart-4: oklch(0.285 0.008 124.038);
  --chart-5: oklch(0.979 0.047 124.359);
}