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

Go to generator

10000+Themes for shadcn/ui

Walnut for shadcn/ui

Walnut is a shadcn/ui theme built around a vivid deep violet primary color (#200533) with vivid deep purple accents (#33052f). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the vivid deep violet primary (#200533) on a violet-tinted background (#0b060e).

Color palette

TokenLightDark
Background
#fdfbfewhite
#0b060eblack
Foreground
#09020eblack
#fdfbfdsnow
Card
#faf7fdghostwhite
#0e0712black
Card foreground
#060109black
#ffffffwhite
Popover
#faf7fdghostwhite
#0e0712black
Popover foreground
#060109black
#ffffffwhite
Primary
#200533black
#200533black
Primary foreground
#bf78f2orchid
#bf78f2orchid
Secondary
#090533black
#090533black
Secondary foreground
#d8d5fblavender
#d8d5fblavender
Muted
#ebebeflavender
#101014black
Muted foreground
#545454dimgray
#abababdarkgray
Accent
#33052fblack
#33052fblack
Accent foreground
#f278e8violet
#f278e8violet
Destructive
#b3400ffirebrick
#d94d12chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#200533black
#200533black

Contrast

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

Light mode
Text on background19.84:1AAA
Text on card19.45:1AAA
Primary button6.35:1AA
Secondary button13.71:1AAA
Muted text6.37:1AA
Accent7.16:1AAA
Destructive5.73:1AA
Dark mode
Text on background19.48:1AAA
Text on card19.82:1AAA
Primary button6.35:1AA
Secondary button13.71:1AAA
Muted text8.27:1AAA
Accent7.16:1AAA
Destructive4.17:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 311.686);
  --foreground: oklch(0.112 0.038 313.747);
  --muted: oklch(0.942 0.006 290.132);
  --muted-foreground: oklch(0.446 0 180);
  --popover: oklch(0.98 0.009 311.647);
  --popover-foreground: oklch(0.097 0.033 314.462);
  --card: oklch(0.98 0.009 311.647);
  --card-foreground: oklch(0.097 0.033 314.462);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.198 0.086 306.812);
  --primary-foreground: oklch(0.697 0.183 309.367);
  --secondary: oklch(0.169 0.086 276.369);
  --secondary-foreground: oklch(0.888 0.051 289.126);
  --accent: oklch(0.229 0.092 331.838);
  --accent-foreground: oklch(0.75 0.198 330.551);
  --destructive: oklch(0.528 0.16 39.533);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.198 0.086 306.812);
  --chart-1: oklch(0.198 0.086 306.812);
  --chart-2: oklch(0.169 0.086 276.369);
  --chart-3: oklch(0.229 0.092 331.838);
  --chart-4: oklch(0.192 0.103 274.596);
  --chart-5: oklch(0.198 0.089 306.612);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.135 0.022 311.653);
  --foreground: oklch(0.991 0.003 311.702);
  --muted: oklch(0.174 0.009 289.274);
  --muted-foreground: oklch(0.741 0 171.254);
  --popover: oklch(0.146 0.025 310.686);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.146 0.025 310.686);
  --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.198 0.086 306.812);
  --primary-foreground: oklch(0.697 0.183 309.367);
  --secondary: oklch(0.169 0.086 276.369);
  --secondary-foreground: oklch(0.888 0.051 289.126);
  --accent: oklch(0.229 0.092 331.838);
  --accent-foreground: oklch(0.75 0.198 330.551);
  --destructive: oklch(0.606 0.186 39.254);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.198 0.086 306.812);
  --chart-1: oklch(0.198 0.086 306.812);
  --chart-2: oklch(0.169 0.086 276.369);
  --chart-3: oklch(0.229 0.092 331.838);
  --chart-4: oklch(0.192 0.103 274.596);
  --chart-5: oklch(0.198 0.089 306.612);
}