Moral is a shadcn/ui theme built around a vivid violet primary color (#a339f9) with vivid green accents (#8ff939). The light mode uses a neutral background (#faf8fb). Dark mode keeps the vivid violet primary (#a339f9) on a violet-tinted background (#0b070d).
| Token | Light | Dark |
|---|---|---|
| Background | #faf8fbghostwhite | #0b070dblack |
| Foreground | #0e0416black | #fdfcfdwhite |
| Card | #f8f5fawhitesmoke | #0d0911black |
| Card foreground | #0b0312black | #ffffffwhite |
| Popover | #f8f5fawhitesmoke | #0d0911black |
| Popover foreground | #0b0312black | #ffffffwhite |
| Primary | #a339f9blueviolet | #a339f9blueviolet |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #8ff939greenyellow | #8ff939greenyellow |
| Secondary foreground | #000000black | #000000black |
| Muted | #e2ebdbgainsboro | #1b2414black |
| Muted foreground | #5b5f58dimgray | #a3a7a0darkgray |
| Accent | #8ff939greenyellow | #8ff939greenyellow |
| Accent foreground | #000000black | #000000black |
| Destructive | #670404maroon | #f60e0ered |
| Destructive foreground | #fca1a1lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a339f9blueviolet | #a339f9blueviolet |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.03:1 | AAA |
| Text on card | 18.74:1 | AAA |
| Primary button | 4.66:1 | AA |
| Secondary button | 15.77:1 | AAA |
| Muted text | 5.33:1 | AA |
| Accent | 15.77:1 | AAA |
| Destructive | 6.72:1 | AA |
| Text on background | 19.53:1 | AAA |
| Text on card | 19.74:1 | AAA |
| Primary button | 4.66:1 | AA |
| Secondary button | 15.77:1 | AAA |
| Muted text | 6.53:1 | AA |
| Accent | 15.77:1 | AAA |
| Destructive | 4.20:1 | AA Large |
Paste this into your globals.css to use Moral in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.004 310.396);
--foreground: oklch(0.136 0.045 309.02);
--muted: oklch(0.93 0.024 130.687);
--muted-foreground: oklch(0.481 0.013 130.686);
--popover: oklch(0.974 0.007 310.374);
--popover-foreground: oklch(0.125 0.039 310.459);
--card: oklch(0.974 0.007 310.374);
--card-foreground: oklch(0.125 0.039 310.459);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.593 0.264 304.099);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.884 0.237 134.723);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.884 0.237 134.723);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.326 0.13 28.581);
--destructive-foreground: oklch(0.8 0.108 19.708);
--ring: oklch(0.593 0.264 304.099);
--chart-1: oklch(0.593 0.264 304.099);
--chart-2: oklch(0.884 0.237 134.723);
--chart-3: oklch(0.884 0.237 134.723);
--chart-4: oklch(0.89 0.225 134.183);
--chart-5: oklch(0.593 0.269 303.79);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.137 0.016 310.273);
--foreground: oklch(0.991 0.002 310.421);
--muted: oklch(0.248 0.033 131.846);
--muted-foreground: oklch(0.723 0.011 130.586);
--popover: oklch(0.149 0.018 309.4);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.149 0.018 309.4);
--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.593 0.264 304.099);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.884 0.237 134.723);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.884 0.237 134.723);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.615 0.248 28.858);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.593 0.264 304.099);
--chart-1: oklch(0.593 0.264 304.099);
--chart-2: oklch(0.884 0.237 134.723);
--chart-3: oklch(0.884 0.237 134.723);
--chart-4: oklch(0.89 0.225 134.183);
--chart-5: oklch(0.593 0.269 303.79);
}