Rectangular is a shadcn/ui theme built around a muted purple primary color (#704865) with muted light purple accents (#eae6e9). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#704865) on a purple-tinted background (#0a0509).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0a0509black |
| Foreground | #090107black | #fdfcfdwhite |
| Card | #fcfcfcsnow | #0d070cblack |
| Card foreground | #040103black | #ffffffwhite |
| Popover | #fcfcfcsnow | #0d070cblack |
| Popover foreground | #040103black | #ffffffwhite |
| Primary | #704865dimgray | #704865dimgray |
| Primary foreground | #f7f3f6whitesmoke | #f7f3f6whitesmoke |
| Secondary | #eae6e9lavender | #2c262adarkslategray |
| Secondary foreground | #564852darkslategray | #c6bec4silver |
| Muted | #f3ecf1whitesmoke | #130c11black |
| Muted foreground | #585557dimgray | #aaa7a9darkgray |
| Accent | #eae6e9lavender | #2c262adarkslategray |
| Accent foreground | #564852darkslategray | #c6bec4silver |
| Destructive | #ba320dfirebrick | #f1633btomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #704865dimgray | #704865dimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.60:1 | AAA |
| Text on card | 20.32:1 | AAA |
| Primary button | 6.84:1 | AA |
| Secondary button | 6.95:1 | AA |
| Muted text | 6.35:1 | AA |
| Accent | 6.95:1 | AA |
| Destructive | 5.90:1 | AA |
| Text on background | 19.73:1 | AAA |
| Text on card | 19.93:1 | AAA |
| Primary button | 6.84:1 | AA |
| Secondary button | 8.16:1 | AAA |
| Muted text | 8.09:1 | AAA |
| Accent | 8.16:1 | AAA |
| Destructive | 6.59:1 | AA |
Paste this into your globals.css to use Rectangular in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.104 0.031 336.006);
--muted: oklch(0.951 0.009 335.366);
--muted-foreground: oklch(0.454 0.006 335.429);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.083 0.025 336.006);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.083 0.025 336.006);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.456 0.069 337.752);
--primary-foreground: oklch(0.967 0.006 335.311);
--secondary: oklch(0.929 0.006 335.307);
--secondary-foreground: oklch(0.42 0.025 336.238);
--accent: oklch(0.929 0.006 335.307);
--accent-foreground: oklch(0.42 0.025 336.238);
--destructive: oklch(0.524 0.178 34.661);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.456 0.069 337.752);
--chart-1: oklch(0.456 0.069 337.752);
--chart-2: oklch(0.929 0.006 335.307);
--chart-3: oklch(0.929 0.006 335.307);
--chart-4: oklch(0.953 0.004 335.266);
--chart-5: oklch(0.455 0.078 338.086);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.127 0.013 335.5);
--foreground: oklch(0.992 0.002 335.22);
--muted: oklch(0.165 0.014 336.684);
--muted-foreground: oklch(0.731 0.005 335.322);
--popover: oklch(0.141 0.015 336.456);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.141 0.015 336.456);
--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.456 0.069 337.752);
--primary-foreground: oklch(0.967 0.006 335.311);
--secondary: oklch(0.276 0.011 335.907);
--secondary-foreground: oklch(0.809 0.013 335.475);
--accent: oklch(0.276 0.011 335.907);
--accent-foreground: oklch(0.809 0.013 335.475);
--destructive: oklch(0.674 0.184 36.183);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.456 0.069 337.752);
--chart-1: oklch(0.456 0.069 337.752);
--chart-2: oklch(0.276 0.011 335.907);
--chart-3: oklch(0.276 0.011 335.907);
--chart-4: oklch(0.307 0.013 335.937);
--chart-5: oklch(0.455 0.078 338.086);
}