Friendly for shadcn/ui

Friendly is a shadcn/ui theme built around a near-black primary color (#080708) with near-black accents (#070808). The light mode uses a neutral background (#fdf7fc). Dark mode keeps the near-black primary (#080708) on a purple-tinted background (#0c030b).

Color palette

TokenLightDark
Background
#fdf7fcsnow
#0c030bblack
Foreground
#140612black
#fdfcfdwhite
Card
#fbf3falavenderblush
#10040fblack
Card foreground
#10050eblack
#ffffffwhite
Popover
#fdf7fcsnow
#0c030bblack
Popover foreground
#140612black
#fdfcfdwhite
Primary
#080708black
#080708black
Primary foreground
#a69ba5darkgray
#a69ba5darkgray
Secondary
#080807black
#080807black
Secondary foreground
#a5a69bdarkgray
#a5a69bdarkgray
Muted
#dddfd3gainsboro
#2b2c20darkslategray
Muted foreground
#6c6f52dimgray
#a9ad90darkgray
Accent
#070808black
#070808black
Accent foreground
#9ba5a6darkgray
#9ba5a6darkgray
Destructive
#c01a11firebrick
#dd1d13crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#080708black
#080708black

Contrast

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

Light mode
Text on background18.68:1AAA
Text on card18.43:1AAA
Primary button7.51:1AAA
Secondary button8.13:1AAA
Muted text3.85:1AA Large
Accent7.94:1AAA
Destructive6.17:1AA
Dark mode
Text on background19.83:1AAA
Text on card20.05:1AAA
Primary button7.51:1AAA
Secondary button8.13:1AAA
Muted text6.09:1AA
Accent7.94:1AAA
Destructive4.94:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 329.789);
  --foreground: oklch(0.151 0.035 332.022);
  --muted: oklch(0.899 0.017 112.887);
  --muted-foreground: oklch(0.532 0.044 114.069);
  --popover: oklch(0.982 0.008 329.789);
  --popover-foreground: oklch(0.151 0.035 332.022);
  --card: oklch(0.973 0.013 329.843);
  --card-foreground: oklch(0.138 0.03 331.627);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.132 0.003 329.805);
  --primary-foreground: oklch(0.702 0.019 330.015);
  --secondary: oklch(0.134 0.002 112.687);
  --secondary-foreground: oklch(0.722 0.016 112.961);
  --accent: oklch(0.133 0.002 207.521);
  --accent-foreground: oklch(0.714 0.011 207.873);
  --destructive: oklch(0.517 0.199 29.308);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.132 0.003 329.805);
  --chart-1: oklch(0.132 0.003 329.805);
  --chart-2: oklch(0.134 0.002 112.687);
  --chart-3: oklch(0.133 0.002 207.521);
  --chart-4: oklch(0.173 0.004 112.947);
  --chart-5: oklch(0.131 0.004 329.866);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.029 331.204);
  --foreground: oklch(0.992 0.002 329.702);
  --muted: oklch(0.289 0.021 113.925);
  --muted-foreground: oklch(0.735 0.041 113.573);
  --popover: oklch(0.123 0.029 331.204);
  --popover-foreground: oklch(0.992 0.002 329.702);
  --card: oklch(0.137 0.033 331.796);
  --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.132 0.003 329.805);
  --primary-foreground: oklch(0.702 0.019 330.015);
  --secondary: oklch(0.134 0.002 112.687);
  --secondary-foreground: oklch(0.722 0.016 112.961);
  --accent: oklch(0.133 0.002 207.521);
  --accent-foreground: oklch(0.714 0.011 207.873);
  --destructive: oklch(0.572 0.222 29.349);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.132 0.003 329.805);
  --chart-1: oklch(0.132 0.003 329.805);
  --chart-2: oklch(0.134 0.002 112.687);
  --chart-3: oklch(0.133 0.002 207.521);
  --chart-4: oklch(0.173 0.004 112.947);
  --chart-5: oklch(0.131 0.004 329.866);
}