Friend for shadcn/ui

Friend is a shadcn/ui theme built around a muted deep violet primary color (#1e1825) with muted deep green accents (#18251e). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep violet primary (#1e1825) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#020104black
#ffffffwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#1e1825black
#1e1825black
Primary foreground
#b7a8c7silver
#b7a8c7silver
Secondary
#251e18black
#251e18black
Secondary foreground
#c7b7a8silver
#c7b7a8silver
Muted
#f5f2efwhitesmoke
#100d0ablack
Muted foreground
#66584ddimgray
#b2a599darkgray
Accent
#18251eblack
#18251eblack
Accent foreground
#a8c7b7silver
#a8c7b7silver
Destructive
#841f06maroon
#f6552ctomato
Destructive foreground
#fcccbfpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1e1825black
#1e1825black

Contrast

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

Light mode
Text on background20.81:1AAA
Text on card20.54:1AAA
Primary button7.78:1AAA
Secondary button8.41:1AAA
Muted text6.14:1AA
Accent8.68:1AAA
Destructive6.66:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button7.78:1AAA
Secondary button8.41:1AAA
Muted text8.07:1AAA
Accent8.68:1AAA
Destructive6.25:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.076 0.024 309.23);
  --muted: oklch(0.963 0.005 64.018);
  --muted-foreground: oklch(0.471 0.025 63.353);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.222 0.027 305.595);
  --primary-foreground: oklch(0.754 0.047 306.347);
  --secondary: oklch(0.242 0.016 63.144);
  --secondary-foreground: oklch(0.788 0.028 63.621);
  --accent: oklch(0.251 0.023 160.853);
  --accent-foreground: oklch(0.803 0.041 162.081);
  --destructive: oklch(0.405 0.14 34.036);
  --destructive-foreground: oklch(0.883 0.058 34.38);
  --ring: oklch(0.222 0.027 305.595);
  --chart-1: oklch(0.222 0.027 305.595);
  --chart-2: oklch(0.242 0.016 63.144);
  --chart-3: oklch(0.251 0.023 160.853);
  --chart-4: oklch(0.275 0.019 63.07);
  --chart-5: oklch(0.221 0.031 305.364);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.16 0.008 63.401);
  --muted-foreground: oklch(0.73 0.023 63.683);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.222 0.027 305.595);
  --primary-foreground: oklch(0.754 0.047 306.347);
  --secondary: oklch(0.242 0.016 63.144);
  --secondary-foreground: oklch(0.788 0.028 63.621);
  --accent: oklch(0.251 0.023 160.853);
  --accent-foreground: oklch(0.803 0.041 162.081);
  --destructive: oklch(0.663 0.204 34.855);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.222 0.027 305.595);
  --chart-1: oklch(0.222 0.027 305.595);
  --chart-2: oklch(0.242 0.016 63.144);
  --chart-3: oklch(0.251 0.023 160.853);
  --chart-4: oklch(0.275 0.019 63.07);
  --chart-5: oklch(0.221 0.031 305.364);
}