Friendly for shadcn/ui

Friendly is a shadcn/ui theme built around a light yellow primary color (#ece1cb) with light violet accents (#e1cbec). The light mode uses a neutral background (#fcfbf8). Dark mode keeps the light yellow primary (#ece1cb) on a yellow-tinted background (#0c0903).

Color palette

TokenLightDark
Background
#fcfbf8snow
#0c0903black
Foreground
#100c05black
#f9f8f6whitesmoke
Card
#fcfbf8snow
#0c0903black
Card foreground
#100c05black
#f9f8f6whitesmoke
Popover
#fcfbf8snow
#0c0903black
Popover foreground
#100c05black
#f9f8f6whitesmoke
Primary
#ece1cbbisque
#ece1cbbisque
Primary foreground
#614d23darkolivegreen
#614d23darkolivegreen
Secondary
#cbece1gainsboro
#cbece1gainsboro
Secondary foreground
#081612black
#081612black
Muted
#d1e5dfgainsboro
#1a2e27darkslategray
Muted foreground
#4a5551darkslategray
#aab5b2darkgray
Accent
#e1cbecgainsboro
#e1cbecgainsboro
Accent foreground
#4d2361indigo
#4d2361indigo
Destructive
#650e01maroon
#f42201red
Destructive foreground
#fea79alightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ece1cbbisque
#ece1cbbisque

Contrast

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

Light mode
Text on background18.80:1AAA
Text on card18.80:1AAA
Primary button6.23:1AA
Secondary button14.65:1AAA
Muted text5.91:1AA
Accent8.04:1AAA
Destructive6.91:1AA
Dark mode
Text on background18.71:1AAA
Text on card18.71:1AAA
Primary button6.23:1AA
Secondary button14.65:1AAA
Muted text6.82:1AA
Accent8.04:1AAA
Destructive4.15:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.004 84.562);
  --foreground: oklch(0.156 0.017 86.99);
  --muted: oklch(0.906 0.023 173.827);
  --muted-foreground: oklch(0.437 0.015 173.534);
  --popover: oklch(0.987 0.004 84.562);
  --popover-foreground: oklch(0.156 0.017 86.99);
  --card: oklch(0.987 0.004 84.562);
  --card-foreground: oklch(0.156 0.017 86.99);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.912 0.032 84.59);
  --primary-foreground: oklch(0.431 0.065 82.843);
  --secondary: oklch(0.916 0.038 173.315);
  --secondary-foreground: oklch(0.187 0.023 170.434);
  --accent: oklch(0.869 0.052 314.54);
  --accent-foreground: oklch(0.345 0.111 312.797);
  --destructive: oklch(0.329 0.122 32.426);
  --destructive-foreground: oklch(0.811 0.106 29.145);
  --ring: oklch(0.912 0.032 84.59);
  --chart-1: oklch(0.912 0.032 84.59);
  --chart-2: oklch(0.916 0.038 173.315);
  --chart-3: oklch(0.869 0.052 314.54);
  --chart-4: oklch(0.934 0.03 173.617);
  --chart-5: oklch(0.914 0.034 84.588);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.017 90.205);
  --foreground: oklch(0.979 0.003 84.56);
  --muted: oklch(0.28 0.029 171.067);
  --muted-foreground: oklch(0.765 0.013 174.069);
  --popover: oklch(0.142 0.017 90.205);
  --popover-foreground: oklch(0.979 0.003 84.56);
  --card: oklch(0.142 0.017 90.205);
  --card-foreground: oklch(0.979 0.003 84.56);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.912 0.032 84.59);
  --primary-foreground: oklch(0.431 0.065 82.843);
  --secondary: oklch(0.916 0.038 173.315);
  --secondary-foreground: oklch(0.187 0.023 170.434);
  --accent: oklch(0.869 0.052 314.54);
  --accent-foreground: oklch(0.345 0.111 312.797);
  --destructive: oklch(0.616 0.24 30.914);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.912 0.032 84.59);
  --chart-1: oklch(0.912 0.032 84.59);
  --chart-2: oklch(0.916 0.038 173.315);
  --chart-3: oklch(0.869 0.052 314.54);
  --chart-4: oklch(0.934 0.03 173.617);
  --chart-5: oklch(0.914 0.034 84.588);
}