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.
Moral is a shadcn/ui theme built around a green primary color (#50b457) with teal accents (#50b489). The light mode uses a neutral background (#f7fcf8). Dark mode keeps the green primary (#50b457) on a neutral background (#020302).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fcf8mintcream | #020302black |
| Foreground | #020802black | #f5faf5whitesmoke |
| Card | #f4fbf4whitesmoke | #040704black |
| Card foreground | #010401black | #f8fbf9mintcream |
| Popover | #f4fbf4whitesmoke | #040704black |
| Popover foreground | #010401black | #f8fbf9mintcream |
| Primary | #50b457mediumseagreen | #50b457mediumseagreen |
| Primary foreground | #112712black | #112712black |
| Secondary | #7bb450yellowgreen | #7bb450yellowgreen |
| Secondary foreground | #1b2711black | #1b2711black |
| Muted | #e7ece4beige | #161b13black |
| Muted foreground | #565d51dimgray | #a7aea2darkgray |
| Accent | #50b489mediumseagreen | #50b489mediumseagreen |
| Accent foreground | #11271eblack | #11271eblack |
| Destructive | #6f0a06maroon | #f1160ered |
| Destructive foreground | #fab0adlightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #50b457mediumseagreen | #50b457mediumseagreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.54:1 | AAA |
| Text on card | 19.57:1 | AAA |
| Primary button | 6.05:1 | AA |
| Secondary button | 6.31:1 | AA |
| Muted text | 5.70:1 | AA |
| Accent | 6.17:1 | AA |
| Destructive | 6.90:1 | AA |
| Text on background | 19.53:1 | AAA |
| Text on card | 19.47:1 | AAA |
| Primary button | 6.05:1 | AA |
| Secondary button | 6.31:1 | AA |
| Muted text | 7.65:1 | AAA |
| Accent | 6.17:1 | AA |
| Destructive | 4.32:1 | AA Large |
Paste this into your globals.css to use Moral in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.008 147.465);
--foreground: oklch(0.123 0.025 145.975);
--muted: oklch(0.938 0.013 131.204);
--muted-foreground: oklch(0.468 0.021 131.487);
--popover: oklch(0.981 0.012 147.423);
--popover-foreground: oklch(0.098 0.02 145.975);
--card: oklch(0.981 0.012 147.423);
--card-foreground: oklch(0.098 0.02 145.975);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.689 0.161 144.785);
--primary-foreground: oklch(0.249 0.048 145.348);
--secondary: oklch(0.709 0.145 133.448);
--secondary-foreground: oklch(0.255 0.043 132.875);
--accent: oklch(0.698 0.115 162.562);
--accent-foreground: oklch(0.252 0.034 163.971);
--destructive: oklch(0.346 0.133 28.97);
--destructive-foreground: oklch(0.826 0.088 21.343);
--ring: oklch(0.689 0.161 144.785);
--chart-1: oklch(0.689 0.161 144.785);
--chart-2: oklch(0.709 0.145 133.448);
--chart-3: oklch(0.698 0.115 162.562);
--chart-4: oklch(0.726 0.137 133.176);
--chart-5: oklch(0.697 0.171 144.618);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.095 0.01 146.783);
--foreground: oklch(0.979 0.007 147.471);
--muted: oklch(0.215 0.018 131.868);
--muted-foreground: oklch(0.743 0.019 131.308);
--popover: oklch(0.119 0.013 146.783);
--popover-foreground: oklch(0.986 0.005 147.496);
--card: oklch(0.119 0.013 146.783);
--card-foreground: oklch(0.986 0.005 147.496);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.689 0.161 144.785);
--primary-foreground: oklch(0.249 0.048 145.348);
--secondary: oklch(0.709 0.145 133.448);
--secondary-foreground: oklch(0.255 0.043 132.875);
--accent: oklch(0.698 0.115 162.562);
--accent-foreground: oklch(0.252 0.034 163.971);
--destructive: oklch(0.607 0.242 29.225);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.689 0.161 144.785);
--chart-1: oklch(0.689 0.161 144.785);
--chart-2: oklch(0.709 0.145 133.448);
--chart-3: oklch(0.698 0.115 162.562);
--chart-4: oklch(0.726 0.137 133.176);
--chart-5: oklch(0.697 0.171 144.618);
}