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.
Treatment is a shadcn/ui theme built around a deep green primary color (#2b5b1a) with deep purple accents (#4b1a5b). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the deep green primary (#2b5b1a) on a neutral background (#020302).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fdf7mintcream | #020302black |
| Foreground | #030902black | #f9fcf8mintcream |
| Card | #f5fcf3honeydew | #040704black |
| Card foreground | #020401black | #fcfdfcwhite |
| Popover | #f8fdf7mintcream | #020302black |
| Popover foreground | #030902black | #f9fcf8mintcream |
| Primary | #2b5b1aforestgreen | #2b5b1aforestgreen |
| Primary foreground | #c8ebbclightgrey | #c8ebbclightgrey |
| Secondary | #4b1a5bindigo | #4b1a5bindigo |
| Secondary foreground | #e0bcebthistle | #e0bcebthistle |
| Muted | #dfcde5gainsboro | #2c1a32darkslategray |
| Muted foreground | #453649darkslategray | #c4b6c9silver |
| Accent | #4b1a5bindigo | #4b1a5bindigo |
| Accent foreground | #e0bcebthistle | #e0bcebthistle |
| Destructive | #5c1c0amaroon | #d03e16firebrick |
| Destructive foreground | #f5b5a3lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2b5b1aforestgreen | #2b5b1aforestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.53:1 | AAA |
| Text on card | 19.69:1 | AAA |
| Primary button | 6.15:1 | AA |
| Secondary button | 7.85:1 | AAA |
| Muted text | 7.44:1 | AAA |
| Accent | 7.85:1 | AAA |
| Destructive | 7.39:1 | AAA |
| Text on background | 19.94:1 | AAA |
| Text on card | 19.88:1 | AAA |
| Primary button | 6.15:1 | AA |
| Secondary button | 7.85:1 | AAA |
| Muted text | 8.33:1 | AAA |
| Accent | 7.85:1 | AAA |
| Destructive | 4.79:1 | AA |
Paste this into your globals.css to use Treatment in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.009 137.779);
--foreground: oklch(0.126 0.026 135.696);
--muted: oklch(0.87 0.037 317.693);
--muted-foreground: oklch(0.357 0.038 317.585);
--popover: oklch(0.989 0.009 137.779);
--popover-foreground: oklch(0.126 0.026 135.696);
--card: oklch(0.983 0.014 137.787);
--card-foreground: oklch(0.1 0.021 135.696);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.422 0.109 138.865);
--primary-foreground: oklch(0.904 0.074 137.919);
--secondary: oklch(0.325 0.117 316.564);
--secondary-foreground: oklch(0.841 0.076 317.613);
--accent: oklch(0.325 0.117 316.564);
--accent-foreground: oklch(0.841 0.076 317.613);
--destructive: oklch(0.326 0.099 35.763);
--destructive-foreground: oklch(0.827 0.08 36.043);
--ring: oklch(0.422 0.109 138.865);
--chart-1: oklch(0.422 0.109 138.865);
--chart-2: oklch(0.325 0.117 316.564);
--chart-3: oklch(0.325 0.117 316.564);
--chart-4: oklch(0.353 0.129 316.511);
--chart-5: oklch(0.426 0.113 138.964);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.096 0.009 136.839);
--foreground: oklch(0.987 0.005 137.772);
--muted: oklch(0.254 0.05 317.377);
--muted-foreground: oklch(0.793 0.031 317.699);
--popover: oklch(0.096 0.009 136.839);
--popover-foreground: oklch(0.987 0.005 137.772);
--card: oklch(0.12 0.012 136.839);
--card-foreground: oklch(0.993 0.002 137.767);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.422 0.109 138.865);
--primary-foreground: oklch(0.904 0.074 137.919);
--secondary: oklch(0.325 0.117 316.564);
--secondary-foreground: oklch(0.841 0.076 317.613);
--accent: oklch(0.325 0.117 316.564);
--accent-foreground: oklch(0.841 0.076 317.613);
--destructive: oklch(0.574 0.189 35.068);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.422 0.109 138.865);
--chart-1: oklch(0.422 0.109 138.865);
--chart-2: oklch(0.325 0.117 316.564);
--chart-3: oklch(0.325 0.117 316.564);
--chart-4: oklch(0.353 0.129 316.511);
--chart-5: oklch(0.426 0.113 138.964);
}