Generate feedback colors (success, warning, error, and info) for shadcn/ui
Go to generatorUsed by 4k+ developers. Want me to build your product next? Let's work together.
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).
| Token | Light | Dark |
|---|---|---|
| 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 |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.84:1 | AAA |
| Text on card | 19.45:1 | AAA |
| Primary button | 6.35:1 | AA |
| Secondary button | 13.71:1 | AAA |
| Muted text | 6.37:1 | AA |
| Accent | 7.16:1 | AAA |
| Destructive | 5.73:1 | AA |
| Text on background | 19.48:1 | AAA |
| Text on card | 19.82:1 | AAA |
| Primary button | 6.35:1 | AA |
| Secondary button | 13.71:1 | AAA |
| Muted text | 8.27:1 | AAA |
| Accent | 7.16:1 | AAA |
| Destructive | 4.17:1 | AA Large |
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);
}