Modus for shadcn/ui

Modus is a shadcn/ui theme built around a vivid orange primary color (#fa560a) with vivid violet accents (#560afa). The light mode uses a neutral background (#fdfcfc). Dark mode keeps the vivid orange primary (#fa560a) on a neutral background (#040202).

Color palette

TokenLightDark
Background
#fdfcfcsnow
#040202black
Foreground
#160903black
#fdfcfcsnow
Card
#fdfcfcsnow
#040202black
Card foreground
#160903black
#fdfcfcsnow
Popover
#fdfcfcsnow
#040202black
Popover foreground
#160903black
#fdfcfcsnow
Primary
#fa560aorangered
#fa560aorangered
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#0afa56springgreen
#0afa56springgreen
Secondary foreground
#013712darkgreen
#013712darkgreen
Muted
#dff1e5gainsboro
#0e2014black
Muted foreground
#5b5d5bdimgray
#a2a4a3darkgray
Accent
#560afablueviolet
#560afablueviolet
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b33b00firebrick
#f55200orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#eeededwhitesmoke
#272625darkslategray
Input
#eeededwhitesmoke
#272625darkslategray
Ring
#fa560aorangered
#fa560aorangered

Contrast

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

Light mode
Text on background19.10:1AAA
Text on card19.10:1AAA
Primary button3.27:1AA Large
Secondary button9.52:1AAA
Muted text5.64:1AA
Accent7.44:1AAA
Destructive5.93:1AA
Dark mode
Text on background20.20:1AAA
Text on card20.20:1AAA
Primary button3.27:1AA Large
Secondary button9.52:1AAA
Muted text6.78:1AA
Accent7.44:1AAA
Destructive3.45:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.002 46.839);
  --foreground: oklch(0.158 0.027 51.619);
  --muted: oklch(0.941 0.025 156.029);
  --muted-foreground: oklch(0.475 0.003 156.433);
  --popover: oklch(0.992 0.002 46.839);
  --popover-foreground: oklch(0.158 0.027 51.619);
  --card: oklch(0.992 0.002 46.839);
  --card-foreground: oklch(0.158 0.027 51.619);
  --border: oklch(0.946 0.001 46.846);
  --input: oklch(0.946 0.001 46.846);
  --primary: oklch(0.669 0.211 38.975);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.858 0.26 146.107);
  --secondary-foreground: oklch(0.294 0.083 148.507);
  --accent: oklch(0.487 0.289 280.706);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.52 0.164 39.728);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.669 0.211 38.975);
  --chart-1: oklch(0.669 0.211 38.975);
  --chart-2: oklch(0.858 0.26 146.107);
  --chart-3: oklch(0.487 0.289 280.706);
  --chart-4: oklch(0.86 0.252 146.917);
  --chart-5: oklch(0.674 0.216 38.497);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.091 0.007 52.014);
  --foreground: oklch(0.992 0.001 46.848);
  --muted: oklch(0.223 0.034 153.023);
  --muted-foreground: oklch(0.717 0.003 156.484);
  --popover: oklch(0.091 0.007 52.014);
  --popover-foreground: oklch(0.992 0.001 46.848);
  --card: oklch(0.091 0.007 52.014);
  --card-foreground: oklch(0.992 0.001 46.848);
  --border: oklch(0.269 0.003 46.744);
  --input: oklch(0.269 0.003 46.744);
  --primary: oklch(0.669 0.211 38.975);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.858 0.26 146.107);
  --secondary-foreground: oklch(0.294 0.083 148.507);
  --accent: oklch(0.487 0.289 280.706);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.656 0.211 38.892);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.669 0.211 38.975);
  --chart-1: oklch(0.669 0.211 38.975);
  --chart-2: oklch(0.858 0.26 146.107);
  --chart-3: oklch(0.487 0.289 280.706);
  --chart-4: oklch(0.86 0.252 146.917);
  --chart-5: oklch(0.674 0.216 38.497);
}