Generate feedback colors (success, warning, error, and info) for shadcn/ui

Go to generator

10000+Themes for shadcn/ui

Yaru for shadcn/ui

Yaru is a shadcn/ui theme built around a near-black primary color (#121212) with neutral gray accents (#d9d9d9). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#121212) on a neutral background (#ffffff).

Color palette

TokenLightDark
Background
#ffffffwhite
#ffffffwhite
Foreground
#121212black
#121212black
Card
#fafafasnow
#fafafasnow
Card foreground
#050505black
#050505black
Popover
#f7f7f7whitesmoke
#f7f7f7whitesmoke
Popover foreground
#000000black
#000000black
Primary
#121212black
#121212black
Primary foreground
#abababdarkgray
#abababdarkgray
Secondary
#bfbfbfsilver
#bfbfbfsilver
Secondary foreground
#262626darkslategray
#262626darkslategray
Muted
#e9e2e2gainsboro
#e9e2e2gainsboro
Muted foreground
#564343darkslategray
#564343darkslategray
Accent
#d9d9d9gainsboro
#d9d9d9gainsboro
Accent foreground
#404040darkslategray
#404040darkslategray
Destructive
#c01502firebrick
#c01502firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#f2f2f2whitesmoke
#f2f2f2whitesmoke
Input
#ebebeblinen
#ebebeblinen
Ring
#121212black
#121212black

Contrast

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

Light mode
Text on background18.73:1AAA
Text on card19.50:1AAA
Primary button8.16:1AAA
Secondary button8.25:1AAA
Muted text7.22:1AAA
Accent7.32:1AAA
Destructive6.27:1AA
Dark mode
Text on background18.73:1AAA
Text on card19.50:1AAA
Primary button8.16:1AAA
Secondary button8.25:1AAA
Muted text7.22:1AAA
Accent7.32:1AAA
Destructive6.27:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.182 0 164.055);
  --muted: oklch(0.919 0.007 17.278);
  --muted-foreground: oklch(0.404 0.025 18.259);
  --popover: oklch(0.977 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.985 0 180);
  --card-foreground: oklch(0.116 0 180);
  --border: oklch(0.962 0 180);
  --input: oklch(0.939 0 180);
  --primary: oklch(0.182 0 164.055);
  --primary-foreground: oklch(0.741 0 171.254);
  --secondary: oklch(0.805 0 169.695);
  --secondary-foreground: oklch(0.27 0 180);
  --accent: oklch(0.885 0 180);
  --accent-foreground: oklch(0.371 0 168.69);
  --destructive: oklch(0.514 0.202 30.463);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.182 0 164.055);
  --chart-1: oklch(0.182 0 164.055);
  --chart-2: oklch(0.805 0 169.695);
  --chart-3: oklch(0.885 0 180);
  --chart-4: oklch(0.829 0 180);
  --chart-5: oklch(0.18 0.002 17.319);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.182 0 164.055);
  --muted: oklch(0.919 0.007 17.278);
  --muted-foreground: oklch(0.404 0.025 18.259);
  --popover: oklch(0.977 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.985 0 180);
  --card-foreground: oklch(0.116 0 180);
  --border: oklch(0.962 0 180);
  --input: oklch(0.939 0 180);
  --primary: oklch(0.182 0 164.055);
  --primary-foreground: oklch(0.741 0 171.254);
  --secondary: oklch(0.805 0 169.695);
  --secondary-foreground: oklch(0.27 0 180);
  --accent: oklch(0.885 0 180);
  --accent-foreground: oklch(0.371 0 168.69);
  --destructive: oklch(0.514 0.202 30.463);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.182 0 164.055);
  --chart-1: oklch(0.182 0 164.055);
  --chart-2: oklch(0.805 0 169.695);
  --chart-3: oklch(0.885 0 180);
  --chart-4: oklch(0.829 0 180);
  --chart-5: oklch(0.18 0.002 17.319);
}