Yang for shadcn/ui

Yang is a shadcn/ui theme built around a red primary color (#972a26) with teal accents (#269397). The light mode uses a neutral background (#fefbfb). Dark mode keeps the red primary (#972a26) on a neutral background (#030202).

Color palette

TokenLightDark
Background
#fefbfbsnow
#030202black
Foreground
#080202black
#fdfcfcsnow
Card
#fcf8f8snow
#070303black
Card foreground
#040101black
#ffffffwhite
Popover
#fcf8f8snow
#070303black
Popover foreground
#040101black
#ffffffwhite
Primary
#972a26brown
#972a26brown
Primary foreground
#fcf3f3lavenderblush
#fcf3f3lavenderblush
Secondary
#269397lightseagreen
#269397lightseagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e9f1f1whitesmoke
#0e1616black
Muted foreground
#567071dimgray
#8ea9a9darkgray
Accent
#269397lightseagreen
#269397lightseagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7f260asaddlebrown
#ed5526chocolate
Destructive foreground
#facfc2peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#972a26brown
#972a26brown

Contrast

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

Light mode
Text on background20.04:1AAA
Text on card19.70:1AAA
Primary button7.21:1AAA
Secondary button3.67:1AA Large
Muted text4.63:1AA
Accent3.67:1AA Large
Destructive6.75:1AA
Dark mode
Text on background20.25:1AAA
Text on card20.48:1AAA
Primary button7.21:1AAA
Secondary button3.67:1AA Large
Muted text7.34:1AAA
Accent3.67:1AA Large
Destructive3.54:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 19.638);
  --foreground: oklch(0.105 0.017 23.674);
  --muted: oklch(0.952 0.009 199.48);
  --muted-foreground: oklch(0.526 0.031 198.874);
  --popover: oklch(0.982 0.005 19.672);
  --popover-foreground: oklch(0.083 0.014 23.674);
  --card: oklch(0.982 0.005 19.672);
  --card-foreground: oklch(0.083 0.014 23.674);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.454 0.146 26.759);
  --primary-foreground: oklch(0.971 0.01 19.744);
  --secondary: oklch(0.607 0.094 198.466);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.607 0.094 198.466);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.404 0.129 36.081);
  --destructive-foreground: oklch(0.888 0.052 37.593);
  --ring: oklch(0.454 0.146 26.759);
  --chart-1: oklch(0.454 0.146 26.759);
  --chart-2: oklch(0.607 0.094 198.466);
  --chart-3: oklch(0.607 0.094 198.466);
  --chart-4: oklch(0.643 0.1 198.473);
  --chart-5: oklch(0.456 0.152 27.127);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.008 21.735);
  --foreground: oklch(0.991 0.002 19.632);
  --muted: oklch(0.191 0.012 198.824);
  --muted-foreground: oklch(0.713 0.03 199.073);
  --popover: oklch(0.109 0.01 21.735);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.109 0.01 21.735);
  --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.454 0.146 26.759);
  --primary-foreground: oklch(0.971 0.01 19.744);
  --secondary: oklch(0.607 0.094 198.466);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.607 0.094 198.466);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.649 0.197 36.55);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.454 0.146 26.759);
  --chart-1: oklch(0.454 0.146 26.759);
  --chart-2: oklch(0.607 0.094 198.466);
  --chart-3: oklch(0.607 0.094 198.466);
  --chart-4: oklch(0.643 0.1 198.473);
  --chart-5: oklch(0.456 0.152 27.127);
}