Worn for shadcn/ui

Worn is a shadcn/ui theme built around a neutral gray primary color (#827986) with neutral gray accents (#7d8679). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#827986) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#09020dblack
#faf9fbghostwhite
Card
#ffffffwhite
#000000black
Card foreground
#09020dblack
#faf9fbghostwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#09020dblack
#faf9fbghostwhite
Primary
#827986gray
#827986gray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7d8679gray
#7d8679gray
Secondary foreground
#000000black
#000000black
Muted
#eff2eewhitesmoke
#0f110dblack
Muted foreground
#475143darkslategray
#b3bcaedarkgray
Accent
#7d8679gray
#7d8679gray
Accent foreground
#000000black
#000000black
Destructive
#7e100cmaroon
#d71a14firebrick
Destructive foreground
#f9c4c2pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#827986gray
#827986gray

Contrast

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

Light mode
Text on background20.46:1AAA
Text on card20.46:1AAA
Primary button4.17:1AA Large
Secondary button5.55:1AA
Muted text7.35:1AAA
Accent5.55:1AA
Destructive6.97:1AA
Dark mode
Text on background20.00:1AAA
Text on card20.00:1AAA
Primary button4.17:1AA Large
Secondary button5.55:1AA
Muted text9.67:1AAA
Accent5.55:1AA
Destructive5.19:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.116 0.034 316.729);
  --muted: oklch(0.957 0.006 134.858);
  --muted-foreground: oklch(0.423 0.027 135.159);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.116 0.034 316.729);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.116 0.034 316.729);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.588 0.022 314.649);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.609 0.021 135.004);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.609 0.021 135.004);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.381 0.144 28.65);
  --destructive-foreground: oklch(0.867 0.061 20.696);
  --ring: oklch(0.588 0.022 314.649);
  --chart-1: oklch(0.588 0.022 314.649);
  --chart-2: oklch(0.609 0.021 135.004);
  --chart-3: oklch(0.609 0.021 135.004);
  --chart-4: oklch(0.634 0.02 134.985);
  --chart-5: oklch(0.583 0.035 314.539);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.003 314.81);
  --muted: oklch(0.174 0.009 135.094);
  --muted-foreground: oklch(0.785 0.023 134.976);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.983 0.003 314.81);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.983 0.003 314.81);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.588 0.022 314.649);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.609 0.021 135.004);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.609 0.021 135.004);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.56 0.218 28.984);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.588 0.022 314.649);
  --chart-1: oklch(0.588 0.022 314.649);
  --chart-2: oklch(0.609 0.021 135.004);
  --chart-3: oklch(0.609 0.021 135.004);
  --chart-4: oklch(0.634 0.02 134.985);
  --chart-5: oklch(0.583 0.035 314.539);
}