Pastel is a shadcn/ui theme built around a yellow primary color (#8d7b16) with purple accents (#7b168d). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the yellow primary (#8d7b16) on a neutral background (#040301).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfdfcwhite | #040301black |
| Foreground | #000000black | #fdfdfcwhite |
| Card | #fcfbf8snow | #070703black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fdfdfcwhite | #040301black |
| Popover foreground | #000000black | #fdfdfcwhite |
| Primary | #8d7b16olive | #8d7b16olive |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #168d7bteal | #168d7bteal |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e0e6e5gainsboro | #191f1eblack |
| Muted foreground | #535f5edimgray | #a0acaadarkgray |
| Accent | #7b168dpurple | #7b168dpurple |
| Accent foreground | #f5dcf9lavender | #f5dcf9lavender |
| Destructive | #961108darkred | #f54538tomato |
| Destructive foreground | #fdd6d3mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #8d7b16olive | #8d7b16olive |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.64:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 4.20:1 | AA Large |
| Secondary button | 4.08:1 | AA Large |
| Muted text | 5.24:1 | AA |
| Accent | 7.02:1 | AAA |
| Destructive | 6.59:1 | AA |
| Text on background | 20.23:1 | AAA |
| Text on card | 20.19:1 | AAA |
| Primary button | 4.20:1 | AA Large |
| Secondary button | 4.08:1 | AA Large |
| Muted text | 7.13:1 | AAA |
| Accent | 7.02:1 | AAA |
| Destructive | 3.63: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 98.346);
--foreground: oklch(0 0 0);
--muted: oklch(0.92 0.007 186.409);
--muted-foreground: oklch(0.476 0.016 185.738);
--popover: oklch(0.994 0.002 98.346);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.988 0.004 98.375);
--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.583 0.114 98.268);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.579 0.101 179.193);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.432 0.189 320.839);
--accent-foreground: oklch(0.923 0.048 321.176);
--destructive: oklch(0.431 0.166 29.743);
--destructive-foreground: oklch(0.908 0.043 22.809);
--ring: oklch(0.583 0.114 98.268);
--chart-1: oklch(0.583 0.114 98.268);
--chart-2: oklch(0.579 0.101 179.193);
--chart-3: oklch(0.432 0.189 320.839);
--chart-4: oklch(0.618 0.108 179.11);
--chart-5: oklch(0.59 0.116 98.094);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.099 0.01 101.344);
--foreground: oklch(0.993 0.001 98.332);
--muted: oklch(0.233 0.009 185.562);
--muted-foreground: oklch(0.734 0.014 186.096);
--popover: oklch(0.099 0.01 101.344);
--popover-foreground: oklch(0.993 0.001 98.332);
--card: oklch(0.125 0.013 101.344);
--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.583 0.114 98.268);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.579 0.101 179.193);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.432 0.189 320.839);
--accent-foreground: oklch(0.923 0.048 321.176);
--destructive: oklch(0.646 0.214 28.64);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.583 0.114 98.268);
--chart-1: oklch(0.583 0.114 98.268);
--chart-2: oklch(0.579 0.101 179.193);
--chart-3: oklch(0.432 0.189 320.839);
--chart-4: oklch(0.618 0.108 179.11);
--chart-5: oklch(0.59 0.116 98.094);
}