Moral is a shadcn/ui theme built around a neutral gray primary color (#d1d4ce) with neutral gray accents (#d4ced1). The light mode uses a neutral background (#fafdf7). Dark mode keeps the neutral gray primary (#d1d4ce) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fafdf7mintcream | #000000black |
| Foreground | #0c1703black | #fafaf9snow |
| Card | #fafdf7mintcream | #000000black |
| Card foreground | #0c1703black | #fafaf9snow |
| Popover | #fafdf7mintcream | #000000black |
| Popover foreground | #0c1703black | #fafaf9snow |
| Primary | #d1d4celightgrey | #d1d4celightgrey |
| Primary foreground | #383b35darkslategray | #383b35darkslategray |
| Secondary | #ced1d4lightgrey | #ced1d4lightgrey |
| Secondary foreground | #35383bdarkslategray | #35383bdarkslategray |
| Muted | #eaf0f6lavender | #090f15black |
| Muted foreground | #545c64dimgray | #9ba3abdarkgray |
| Accent | #d4ced1lightgrey | #d4ced1lightgrey |
| Accent foreground | #3b3538darkslategray | #3b3538darkslategray |
| Destructive | #860604darkred | #f81512red |
| Destructive foreground | #fdc0bflightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d1d4celightgrey | #d1d4celightgrey |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 17.97:1 | AAA |
| Text on card | 17.97:1 | AAA |
| Primary button | 7.59:1 | AAA |
| Secondary button | 7.69:1 | AAA |
| Muted text | 5.89:1 | AA |
| Accent | 7.74:1 | AAA |
| Destructive | 6.61:1 | AA |
| Text on background | 20.10:1 | AAA |
| Text on card | 20.10:1 | AAA |
| Primary button | 7.59:1 | AAA |
| Secondary button | 7.69:1 | AAA |
| Muted text | 7.52:1 | AAA |
| Accent | 7.74:1 | AAA |
| Destructive | 4.11:1 | AA Large |
Paste this into your globals.css to use Moral in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.01 129.228);
--foreground: oklch(0.187 0.042 130.554);
--muted: oklch(0.951 0.01 249.749);
--muted-foreground: oklch(0.469 0.017 249.974);
--popover: oklch(0.99 0.01 129.228);
--popover-foreground: oklch(0.187 0.042 130.554);
--card: oklch(0.99 0.01 129.228);
--card-foreground: oklch(0.187 0.042 130.554);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.866 0.008 129.225);
--primary-foreground: oklch(0.348 0.012 129.507);
--secondary: oklch(0.859 0.005 249.704);
--secondary-foreground: oklch(0.339 0.008 249.853);
--accent: oklch(0.858 0.007 346.235);
--accent-foreground: oklch(0.336 0.011 346.864);
--destructive: oklch(0.392 0.156 29.091);
--destructive-foreground: oklch(0.862 0.071 19.744);
--ring: oklch(0.866 0.008 129.225);
--chart-1: oklch(0.866 0.008 129.225);
--chart-2: oklch(0.859 0.005 249.704);
--chart-3: oklch(0.858 0.007 346.235);
--chart-4: oklch(0.883 0.004 249.693);
--chart-5: oklch(0.868 0.012 129.274);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.986 0.002 129.143);
--muted: oklch(0.166 0.016 250.434);
--muted-foreground: oklch(0.712 0.015 249.847);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.986 0.002 129.143);
--card: oklch(0 0 0);
--card-foreground: oklch(0.986 0.002 129.143);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.866 0.008 129.225);
--primary-foreground: oklch(0.348 0.012 129.507);
--secondary: oklch(0.859 0.005 249.704);
--secondary-foreground: oklch(0.339 0.008 249.853);
--accent: oklch(0.858 0.007 346.235);
--accent-foreground: oklch(0.336 0.011 346.864);
--destructive: oklch(0.619 0.247 28.939);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.866 0.008 129.225);
--chart-1: oklch(0.866 0.008 129.225);
--chart-2: oklch(0.859 0.005 249.704);
--chart-3: oklch(0.858 0.007 346.235);
--chart-4: oklch(0.883 0.004 249.693);
--chart-5: oklch(0.868 0.012 129.274);
}