Triad for shadcn/ui

Triad is a shadcn/ui theme built around a neutral gray primary color (#c9cdc6) with neutral gray accents (#c6cdc6). The light mode uses a neutral background (#fcfefb). Dark mode keeps the neutral gray primary (#c9cdc6) on a neutral background (#020402).

Color palette

TokenLightDark
Background
#fcfefbwhite
#020402black
Foreground
#000000black
#f7f8f6whitesmoke
Card
#fafdf7mintcream
#050703black
Card foreground
#000000black
#fafbf9snow
Popover
#fafdf7mintcream
#050703black
Popover foreground
#000000black
#fafbf9snow
Primary
#c9cdc6silver
#c9cdc6silver
Primary foreground
#30342ddarkslategray
#30342ddarkslategray
Secondary
#cdcdc6lightgrey
#cdcdc6lightgrey
Secondary foreground
#33342ddarkslategray
#33342ddarkslategray
Muted
#ebece4beige
#1a1b13black
Muted foreground
#50514ddarkslategray
#b1b2aedarkgray
Accent
#c6cdc6silver
#c6cdc6silver
Accent foreground
#2d342edarkslategray
#2d342edarkslategray
Destructive
#af0e0efirebrick
#ee2b2bcrimson
Destructive foreground
#fef1f1lavenderblush
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c9cdc6silver
#c9cdc6silver

Contrast

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

Light mode
Text on background20.68:1AAA
Text on card20.38:1AAA
Primary button7.88:1AAA
Secondary button7.87:1AAA
Muted text6.72:1AA
Accent7.89:1AAA
Destructive6.61:1AA
Dark mode
Text on background19.34:1AAA
Text on card19.48:1AAA
Primary button7.88:1AAA
Secondary button7.87:1AAA
Muted text8.14:1AAA
Accent7.89:1AAA
Destructive4.19:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 131.117);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.94 0.01 109.684);
  --muted-foreground: oklch(0.432 0.005 109.698);
  --popover: oklch(0.989 0.007 131.151);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.989 0.007 131.151);
  --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.843 0.011 131.202);
  --primary-foreground: oklch(0.318 0.013 131.448);
  --secondary: oklch(0.846 0.01 109.703);
  --secondary-foreground: oklch(0.322 0.012 110.148);
  --accent: oklch(0.841 0.013 147.397);
  --accent-foreground: oklch(0.316 0.014 147.08);
  --destructive: oklch(0.478 0.189 28.426);
  --destructive-foreground: oklch(0.968 0.014 17.399);
  --ring: oklch(0.843 0.011 131.202);
  --chart-1: oklch(0.843 0.011 131.202);
  --chart-2: oklch(0.846 0.01 109.703);
  --chart-3: oklch(0.841 0.013 147.397);
  --chart-4: oklch(0.869 0.009 109.665);
  --chart-5: oklch(0.846 0.016 131.252);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.011 130.136);
  --foreground: oklch(0.979 0.003 131.108);
  --muted: oklch(0.218 0.015 110.699);
  --muted-foreground: oklch(0.761 0.004 109.587);
  --popover: oklch(0.123 0.014 130.136);
  --popover-foreground: oklch(0.986 0.002 131.1);
  --card: oklch(0.123 0.014 130.136);
  --card-foreground: oklch(0.986 0.002 131.1);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.843 0.011 131.202);
  --primary-foreground: oklch(0.318 0.013 131.448);
  --secondary: oklch(0.846 0.01 109.703);
  --secondary-foreground: oklch(0.322 0.012 110.148);
  --accent: oklch(0.841 0.013 147.397);
  --accent-foreground: oklch(0.316 0.014 147.08);
  --destructive: oklch(0.612 0.228 27.272);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.843 0.011 131.202);
  --chart-1: oklch(0.843 0.011 131.202);
  --chart-2: oklch(0.846 0.01 109.703);
  --chart-3: oklch(0.841 0.013 147.397);
  --chart-4: oklch(0.869 0.009 109.665);
  --chart-5: oklch(0.846 0.016 131.252);
}