Frayed for shadcn/ui

Frayed is a shadcn/ui theme built around a muted violet primary color (#5f4a68) with muted light violet accents (#cbbdd1). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the muted violet primary (#5f4a68) on a violet-tinted background (#0c050f).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#0c050fblack
Foreground
#0d0311black
#faf8fbghostwhite
Card
#fbf8fcghostwhite
#0f0613black
Card foreground
#0a020dblack
#fdfcfdwhite
Popover
#fdfcfdwhite
#0c050fblack
Popover foreground
#0d0311black
#faf8fbghostwhite
Primary
#5f4a68dimgray
#5f4a68dimgray
Primary foreground
#f3f0f4whitesmoke
#f3f0f4whitesmoke
Secondary
#dfdae1gainsboro
#343135darkslategray
Secondary foreground
#483d4cdarkslategray
#cdcacelightgrey
Muted
#dad6dcgainsboro
#272329darkslategray
Muted foreground
#4e4851darkslategray
#b4aeb7darkgray
Accent
#cbbdd1thistle
#504554darkslategray
Accent foreground
#312636darkslategray
#e7e3e8gainsboro
Destructive
#d34f03chocolate
#fb5f04orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5f4a68dimgray
#5f4a68dimgray

Contrast

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

Light mode
Text on background19.70:1AAA
Text on card19.38:1AAA
Primary button6.95:1AA
Secondary button7.46:1AAA
Muted text6.16:1AA
Accent8.02:1AAA
Destructive4.28:1AA Large
Dark mode
Text on background19.03:1AAA
Text on card19.40:1AAA
Primary button6.95:1AA
Secondary button7.91:1AAA
Muted text7.09:1AAA
Accent7.15:1AAA
Destructive6.72:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 316.011);
  --foreground: oklch(0.13 0.038 316.603);
  --muted: oklch(0.88 0.009 315.983);
  --muted-foreground: oklch(0.411 0.017 315.872);
  --popover: oklch(0.991 0.003 316.011);
  --popover-foreground: oklch(0.13 0.038 316.603);
  --card: oklch(0.982 0.006 316.001);
  --card-foreground: oklch(0.117 0.033 317.901);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.443 0.055 315.567);
  --primary-foreground: oklch(0.959 0.007 315.997);
  --secondary: oklch(0.895 0.011 315.976);
  --secondary-foreground: oklch(0.378 0.029 315.749);
  --accent: oklch(0.816 0.032 315.882);
  --accent-foreground: oklch(0.288 0.034 315.598);
  --destructive: oklch(0.599 0.18 41.927);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.443 0.055 315.567);
  --chart-1: oklch(0.443 0.055 315.567);
  --chart-2: oklch(0.895 0.011 315.976);
  --chart-3: oklch(0.816 0.032 315.882);
  --chart-4: oklch(0.92 0.009 315.988);
  --chart-5: oklch(0.44 0.065 315.476);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.028 316.364);
  --foreground: oklch(0.983 0.004 316.006);
  --muted: oklch(0.264 0.013 315.849);
  --muted-foreground: oklch(0.759 0.015 315.952);
  --popover: oklch(0.134 0.028 316.364);
  --popover-foreground: oklch(0.983 0.004 316.006);
  --card: oklch(0.146 0.032 315.65);
  --card-foreground: oklch(0.991 0.002 316.014);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.443 0.055 315.567);
  --primary-foreground: oklch(0.959 0.007 315.997);
  --secondary: oklch(0.318 0.008 315.93);
  --secondary-foreground: oklch(0.842 0.006 315.994);
  --accent: oklch(0.406 0.029 315.77);
  --accent-foreground: oklch(0.92 0.008 315.991);
  --destructive: oklch(0.681 0.206 41.519);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.443 0.055 315.567);
  --chart-1: oklch(0.443 0.055 315.567);
  --chart-2: oklch(0.318 0.008 315.93);
  --chart-3: oklch(0.406 0.029 315.77);
  --chart-4: oklch(0.347 0.009 315.927);
  --chart-5: oklch(0.44 0.065 315.476);
}