Loafer is a shadcn/ui theme built around a neutral gray primary color (#e5e6e6) with neutral gray accents (#e6e6e5). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#e5e6e6) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #000000black | #f7f8f8whitesmoke |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #000000black | #f9fafaghostwhite |
| Popover | #fcfcfcsnow | #030303black |
| Popover foreground | #000000black | #f9fafaghostwhite |
| Primary | #e5e6e6gainsboro | #e5e6e6gainsboro |
| Primary foreground | #4c4d4ddarkslategray | #4c4d4ddarkslategray |
| Secondary | #e6e5e6gainsboro | #e6e5e6gainsboro |
| Secondary foreground | #4d4c4ddarkslategray | #4d4c4ddarkslategray |
| Muted | #e9e0eblavender | #1d141fblack |
| Muted foreground | #413e42darkslategray | #c1bdc1silver |
| Accent | #e6e6e5gainsboro | #e6e6e5gainsboro |
| Accent foreground | #4d4d4cdarkslategray | #4d4d4cdarkslategray |
| Destructive | #c13310firebrick | #f06542tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #e5e6e6gainsboro | #e5e6e6gainsboro |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 6.77:1 | AA |
| Secondary button | 6.80:1 | AA |
| Muted text | 8.19:1 | AAA |
| Accent | 6.75:1 | AA |
| Destructive | 5.58:1 | AA |
| Text on background | 19.73:1 | AAA |
| Text on card | 19.77:1 | AAA |
| Primary button | 6.77:1 | AA |
| Secondary button | 6.80:1 | AA |
| Muted text | 9.65:1 | AAA |
| Accent | 6.75:1 | AA |
| Destructive | 6.63:1 | AA |
Paste this into your globals.css to use Loafer in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.917 0.018 321.108);
--muted-foreground: oklch(0.368 0.008 321.111);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0 161.565);
--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.924 0.001 186.58);
--primary-foreground: oklch(0.42 0.002 186.472);
--secondary: oklch(0.923 0.001 321.067);
--secondary-foreground: oklch(0.417 0.003 321.081);
--accent: oklch(0.924 0.001 98.327);
--accent-foreground: oklch(0.42 0.002 98.39);
--destructive: oklch(0.538 0.184 34.038);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.924 0.001 186.58);
--chart-1: oklch(0.924 0.001 186.58);
--chart-2: oklch(0.923 0.001 321.067);
--chart-3: oklch(0.924 0.001 98.327);
--chart-4: oklch(0.946 0.001 321.067);
--chart-5: oklch(0.925 0.002 186.534);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.978 0.002 186.548);
--muted: oklch(0.208 0.026 321.313);
--muted-foreground: oklch(0.803 0.006 321.083);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.986 0.001 186.564);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.986 0.001 186.564);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.924 0.001 186.58);
--primary-foreground: oklch(0.42 0.002 186.472);
--secondary: oklch(0.923 0.001 321.067);
--secondary-foreground: oklch(0.417 0.003 321.081);
--accent: oklch(0.924 0.001 98.327);
--accent-foreground: oklch(0.42 0.002 98.39);
--destructive: oklch(0.675 0.179 35.194);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.924 0.001 186.58);
--chart-1: oklch(0.924 0.001 186.58);
--chart-2: oklch(0.923 0.001 321.067);
--chart-3: oklch(0.924 0.001 98.327);
--chart-4: oklch(0.946 0.001 321.067);
--chart-5: oklch(0.925 0.002 186.534);
}