Friend for shadcn/ui

Friend is a shadcn/ui theme built around a muted purple primary color (#c3b5c5) with muted pink accents (#c5b5bf). The light mode uses a neutral background (#fcf7fd). Dark mode keeps the muted purple primary (#c3b5c5) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf7fdghostwhite
#000000black
Foreground
#0b030cblack
#ffffffwhite
Card
#fcf7fdghostwhite
#000000black
Card foreground
#0b030cblack
#ffffffwhite
Popover
#fcf7fdghostwhite
#000000black
Popover foreground
#0b030cblack
#ffffffwhite
Primary
#c3b5c5silver
#c3b5c5silver
Primary foreground
#271f28darkslategray
#271f28darkslategray
Secondary
#bbb5c5silver
#bbb5c5silver
Secondary foreground
#231f28black
#231f28black
Muted
#efedf2whitesmoke
#0f0d12black
Muted foreground
#484252darkslategray
#b3adbddarkgray
Accent
#c5b5bfsilver
#c5b5bfsilver
Accent foreground
#281f25black
#281f25black
Destructive
#c61b15firebrick
#d01c16firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c3b5c5silver
#c3b5c5silver

Contrast

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

Light mode
Text on background19.20:1AAA
Text on card19.20:1AAA
Primary button8.15:1AAA
Secondary button8.08:1AAA
Muted text8.30:1AAA
Accent8.15:1AAA
Destructive5.86:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button8.15:1AAA
Secondary button8.08:1AAA
Muted text8.87:1AAA
Accent8.15:1AAA
Destructive5.45:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.011 322.149);
  --foreground: oklch(0.122 0.031 323.773);
  --muted: oklch(0.949 0.007 303.527);
  --muted-foreground: oklch(0.391 0.028 302.567);
  --popover: oklch(0.981 0.011 322.149);
  --popover-foreground: oklch(0.122 0.031 323.773);
  --card: oklch(0.981 0.011 322.149);
  --card-foreground: oklch(0.122 0.031 323.773);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.789 0.027 322.229);
  --primary-foreground: oklch(0.253 0.019 322.364);
  --secondary: oklch(0.782 0.023 303.2);
  --secondary-foreground: oklch(0.248 0.017 302.645);
  --accent: oklch(0.789 0.023 340.088);
  --accent-foreground: oklch(0.253 0.016 340.822);
  --destructive: oklch(0.53 0.204 28.85);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.789 0.027 322.229);
  --chart-1: oklch(0.789 0.027 322.229);
  --chart-2: oklch(0.782 0.023 303.2);
  --chart-3: oklch(0.789 0.023 340.088);
  --chart-4: oklch(0.808 0.02 303.266);
  --chart-5: oklch(0.787 0.034 322.257);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.163 0.011 302.614);
  --muted-foreground: oklch(0.758 0.024 303.172);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.789 0.027 322.229);
  --primary-foreground: oklch(0.253 0.019 322.364);
  --secondary: oklch(0.782 0.023 303.2);
  --secondary-foreground: oklch(0.248 0.017 302.645);
  --accent: oklch(0.789 0.023 340.088);
  --accent-foreground: oklch(0.253 0.016 340.822);
  --destructive: oklch(0.548 0.211 28.872);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.789 0.027 322.229);
  --chart-1: oklch(0.789 0.027 322.229);
  --chart-2: oklch(0.782 0.023 303.2);
  --chart-3: oklch(0.789 0.023 340.088);
  --chart-4: oklch(0.808 0.02 303.266);
  --chart-5: oklch(0.787 0.034 322.257);
}