Mellow is a shadcn/ui theme built around a violet primary color (#7f3ad4) with purple accents (#cc3ad4). The light mode uses a neutral background (#faf8fc). Dark mode keeps the violet primary (#7f3ad4) on a violet-tinted background (#07040b).
| Token | Light | Dark |
|---|---|---|
| Background | #faf8fcghostwhite | #07040bblack |
| Foreground | #0a0311black | #ffffffwhite |
| Card | #f7f5fawhitesmoke | #0a050fblack |
| Card foreground | #07020dblack | #ffffffwhite |
| Popover | #f7f5fawhitesmoke | #0a050fblack |
| Popover foreground | #07020dblack | #ffffffwhite |
| Primary | #7f3ad4blueviolet | #7f3ad4blueviolet |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #3a42d4royalblue | #3a42d4royalblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dadae2gainsboro | #1d1e25black |
| Muted foreground | #5c5d6adimgray | #9595a3darkgray |
| Accent | #cc3ad4mediumorchid | #cc3ad4mediumorchid |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #631008maroon | #f05142tomato |
| Destructive foreground | #f8aca5lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7f3ad4blueviolet | #7f3ad4blueviolet |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.25:1 | AAA |
| Text on card | 18.94:1 | AAA |
| Primary button | 6.04:1 | AA |
| Secondary button | 7.20:1 | AAA |
| Muted text | 4.68:1 | AA |
| Accent | 4.08:1 | AA Large |
| Destructive | 7.11:1 | AAA |
| Text on background | 20.35:1 | AAA |
| Text on card | 20.14:1 | AAA |
| Primary button | 6.04:1 | AA |
| Secondary button | 7.20:1 | AAA |
| Muted text | 5.63:1 | AA |
| Accent | 4.08:1 | AA Large |
| Destructive | 3.53:1 | AA Large |
Paste this into your globals.css to use Mellow in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.005 306.369);
--foreground: oklch(0.124 0.036 306.065);
--muted: oklch(0.891 0.01 283.77);
--muted-foreground: oklch(0.483 0.021 283.186);
--popover: oklch(0.973 0.007 306.338);
--popover-foreground: oklch(0.112 0.032 307.721);
--card: oklch(0.973 0.007 306.338);
--card-foreground: oklch(0.112 0.032 307.721);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.525 0.22 299.062);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.476 0.218 272.292);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.624 0.244 325.826);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.326 0.117 29.953);
--destructive-foreground: oklch(0.816 0.09 25);
--ring: oklch(0.525 0.22 299.062);
--chart-1: oklch(0.525 0.22 299.062);
--chart-2: oklch(0.476 0.218 272.292);
--chart-3: oklch(0.624 0.244 325.826);
--chart-4: oklch(0.505 0.205 274.044);
--chart-5: oklch(0.523 0.228 298.548);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.119 0.021 307.422);
--foreground: oklch(1 0 180);
--muted: oklch(0.236 0.014 282.852);
--muted-foreground: oklch(0.674 0.019 283.462);
--popover: oklch(0.131 0.024 306.082);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.131 0.024 306.082);
--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.525 0.22 299.062);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.476 0.218 272.292);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.624 0.244 325.826);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.651 0.197 28.821);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.525 0.22 299.062);
--chart-1: oklch(0.525 0.22 299.062);
--chart-2: oklch(0.476 0.218 272.292);
--chart-3: oklch(0.624 0.244 325.826);
--chart-4: oklch(0.505 0.205 274.044);
--chart-5: oklch(0.523 0.228 298.548);
}