Afraid for shadcn/ui

Afraid is a shadcn/ui theme built around a muted deep purple primary color (#1a0f19) with muted deep pink accents (#1a0f13). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep purple primary (#1a0f19) on a neutral background (#040104).

Color palette

TokenLightDark
Background
#ffffffwhite
#040104black
Foreground
#120311black
#fbf9fbsnow
Card
#ffffffwhite
#040104black
Card foreground
#120311black
#fbf9fbsnow
Popover
#ffffffwhite
#040104black
Popover foreground
#120311black
#fbf9fbsnow
Primary
#1a0f19black
#1a0f19black
Primary foreground
#c397c0darkgray
#c397c0darkgray
Secondary
#150f1ablack
#150f1ablack
Secondary foreground
#b197c3darkgray
#b197c3darkgray
Muted
#dfdae2gainsboro
#221d25black
Muted foreground
#605568dimgray
#a297aadarkgray
Accent
#1a0f13black
#1a0f13black
Accent foreground
#c397aarosybrown
#c397aarosybrown
Destructive
#9b2608firebrick
#f3461borangered
Destructive foreground
#fde0d8mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1a0f19black
#1a0f19black

Contrast

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

Light mode
Text on background20.06:1AAA
Text on card20.06:1AAA
Primary button7.55:1AAA
Secondary button7.24:1AAA
Muted text5.08:1AA
Accent7.42:1AAA
Destructive6.30:1AA
Dark mode
Text on background19.81:1AAA
Text on card19.81:1AAA
Primary button7.55:1AAA
Secondary button7.24:1AAA
Muted text5.93:1AA
Accent7.42:1AAA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.136 0.044 330.541);
  --muted: oklch(0.894 0.012 311.617);
  --muted-foreground: oklch(0.467 0.033 311.157);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.136 0.044 330.541);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.136 0.044 330.541);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.188 0.026 329.441);
  --primary-foreground: oklch(0.732 0.076 329.092);
  --secondary: oklch(0.182 0.024 310.641);
  --secondary-foreground: oklch(0.715 0.069 310.948);
  --accent: oklch(0.185 0.02 352.586);
  --accent-foreground: oklch(0.724 0.058 351.803);
  --destructive: oklch(0.455 0.158 33.885);
  --destructive-foreground: oklch(0.928 0.034 34.309);
  --ring: oklch(0.188 0.026 329.441);
  --chart-1: oklch(0.188 0.026 329.441);
  --chart-2: oklch(0.182 0.024 310.641);
  --chart-3: oklch(0.185 0.02 352.586);
  --chart-4: oklch(0.212 0.032 310.49);
  --chart-5: oklch(0.187 0.029 329.584);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.018 329.308);
  --foreground: oklch(0.984 0.003 328.094);
  --muted: oklch(0.24 0.016 311.176);
  --muted-foreground: oklch(0.693 0.03 311.377);
  --popover: oklch(0.086 0.018 329.308);
  --popover-foreground: oklch(0.984 0.003 328.094);
  --card: oklch(0.086 0.018 329.308);
  --card-foreground: oklch(0.984 0.003 328.094);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.188 0.026 329.441);
  --primary-foreground: oklch(0.732 0.076 329.092);
  --secondary: oklch(0.182 0.024 310.641);
  --secondary-foreground: oklch(0.715 0.069 310.948);
  --accent: oklch(0.185 0.02 352.586);
  --accent-foreground: oklch(0.724 0.058 351.803);
  --destructive: oklch(0.642 0.215 34.261);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.188 0.026 329.441);
  --chart-1: oklch(0.188 0.026 329.441);
  --chart-2: oklch(0.182 0.024 310.641);
  --chart-3: oklch(0.185 0.02 352.586);
  --chart-4: oklch(0.212 0.032 310.49);
  --chart-5: oklch(0.187 0.029 329.584);
}