Pastel is a shadcn/ui theme built around a muted green primary color (#81956f) with muted violet accents (#836f95). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the muted green primary (#81956f) on a green-tinted background (#0a0d07).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdfcwhite | #0a0d07black |
| Foreground | #020401black | #fafbf9snow |
| Card | #fafcf8snow | #0d1109black |
| Card foreground | #000000black | #fcfdfcwhite |
| Popover | #fafcf8snow | #0d1109black |
| Popover foreground | #000000black | #fcfdfcwhite |
| Primary | #81956fgray | #81956fgray |
| Primary foreground | #000000black | #000000black |
| Secondary | #836f95slategray | #836f95slategray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #ede7f4lavender | #120b18black |
| Muted foreground | #4d4653darkslategray | #b3acb9darkgray |
| Accent | #836f95slategray | #836f95slategray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #b2290afirebrick | #f2441corangered |
| Destructive foreground | #fef3f1seashell | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #81956fgray | #81956fgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.23:1 | AAA |
| Text on card | 20.28:1 | AAA |
| Primary button | 6.45:1 | AA |
| Secondary button | 4.48:1 | AA Large |
| Muted text | 7.46:1 | AAA |
| Accent | 4.48:1 | AA Large |
| Destructive | 5.98:1 | AA |
| Text on background | 18.80:1 | AAA |
| Text on card | 18.73:1 | AAA |
| Primary button | 6.45:1 | AA |
| Secondary button | 4.48:1 | AA Large |
| Muted text | 8.74:1 | AAA |
| Accent | 4.48:1 | AA Large |
| Destructive | 3.74:1 | AA Large |
Paste this into your globals.css to use Pastel in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.002 129.151);
--foreground: oklch(0.102 0.019 127.71);
--muted: oklch(0.936 0.019 308.912);
--muted-foreground: oklch(0.406 0.022 308.565);
--popover: oklch(0.988 0.005 129.177);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.988 0.005 129.177);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.644 0.058 130.142);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.575 0.061 308.011);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.575 0.061 308.011);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.501 0.178 33.133);
--destructive-foreground: oklch(0.972 0.012 32.665);
--ring: oklch(0.644 0.058 130.142);
--chart-1: oklch(0.644 0.058 130.142);
--chart-2: oklch(0.575 0.061 308.011);
--chart-3: oklch(0.575 0.061 308.011);
--chart-4: oklch(0.602 0.056 308.14);
--chart-5: oklch(0.651 0.069 130.342);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.155 0.015 129.303);
--foreground: oklch(0.986 0.003 129.154);
--muted: oklch(0.167 0.029 307.258);
--muted-foreground: oklch(0.755 0.019 308.866);
--popover: oklch(0.169 0.018 130.197);
--popover-foreground: oklch(0.993 0.001 129.14);
--card: oklch(0.169 0.018 130.197);
--card-foreground: oklch(0.993 0.001 129.14);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.644 0.058 130.142);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.575 0.061 308.011);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.575 0.061 308.011);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.638 0.216 33.571);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.644 0.058 130.142);
--chart-1: oklch(0.644 0.058 130.142);
--chart-2: oklch(0.575 0.061 308.011);
--chart-3: oklch(0.575 0.061 308.011);
--chart-4: oklch(0.602 0.056 308.14);
--chart-5: oklch(0.651 0.069 130.342);
}