Generate feedback colors (success, warning, error, and info) for shadcn/ui
Go to generatorUsed by 4k+ developers. Want me to build your product next? Let's work together.
Rectangular is a shadcn/ui theme built around a muted deep purple primary color (#513d57) with muted purple accents (#c3b1c9). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep purple primary (#513d57) on a neutral background (#030203).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030203black |
| Foreground | #0e0312black | #faf9fbghostwhite |
| Card | #ffffffwhite | #030203black |
| Card foreground | #0e0312black | #faf9fbghostwhite |
| Popover | #ffffffwhite | #030203black |
| Popover foreground | #0e0312black | #faf9fbghostwhite |
| Primary | #513d57darkslategray | #513d57darkslategray |
| Primary foreground | #e6dee8gainsboro | #e6dee8gainsboro |
| Secondary | #d1cad3lightgrey | #18141ablack |
| Secondary foreground | #38303bdarkslategray | #b5a6b9darkgray |
| Muted | #efeaf0whitesmoke | #130f15black |
| Muted foreground | #5b575cdimgray | #a7a3a8darkgray |
| Accent | #c3b1c9silver | #322636darkslategray |
| Accent foreground | #271d2adarkslategray | #ccbdd1thistle |
| Destructive | #6f1b01maroon | #e33702orangered |
| Destructive foreground | #feb9a4lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #513d57darkslategray | #513d57darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.18:1 | AAA |
| Text on card | 20.18:1 | AAA |
| Primary button | 7.43:1 | AAA |
| Secondary button | 7.90:1 | AAA |
| Muted text | 5.98:1 | AA |
| Accent | 8.05:1 | AAA |
| Destructive | 6.92:1 | AA |
| Text on background | 19.75:1 | AAA |
| Text on card | 19.75:1 | AAA |
| Primary button | 7.43:1 | AAA |
| Secondary button | 7.88:1 | AAA |
| Muted text | 7.62:1 | AAA |
| Accent | 8.04:1 | AAA |
| Destructive | 4.36:1 | AA Large |
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.131 0.042 319.295);
--muted: oklch(0.943 0.009 318.321);
--muted-foreground: oklch(0.461 0.01 318.309);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.131 0.042 319.295);
--card: oklch(1 0 180);
--card-foreground: oklch(0.131 0.042 319.295);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.391 0.051 318.185);
--primary-foreground: oklch(0.909 0.016 318.313);
--secondary: oklch(0.847 0.016 318.312);
--secondary-foreground: oklch(0.323 0.022 318.262);
--accent: oklch(0.783 0.039 318.281);
--accent-foreground: oklch(0.249 0.028 318.211);
--destructive: oklch(0.36 0.122 35.929);
--destructive-foreground: oklch(0.845 0.086 37.619);
--ring: oklch(0.391 0.051 318.185);
--chart-1: oklch(0.391 0.051 318.185);
--chart-2: oklch(0.847 0.016 318.312);
--chart-3: oklch(0.783 0.039 318.281);
--chart-4: oklch(0.872 0.013 318.315);
--chart-5: oklch(0.389 0.059 318.15);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.088 0.01 319.352);
--foreground: oklch(0.984 0.003 318.327);
--muted: oklch(0.177 0.013 318.253);
--muted-foreground: oklch(0.721 0.009 318.318);
--popover: oklch(0.088 0.01 319.352);
--popover-foreground: oklch(0.984 0.003 318.327);
--card: oklch(0.088 0.01 319.352);
--card-foreground: oklch(0.984 0.003 318.327);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.391 0.051 318.185);
--primary-foreground: oklch(0.909 0.016 318.313);
--secondary: oklch(0.2 0.013 318.267);
--secondary-foreground: oklch(0.745 0.031 318.288);
--accent: oklch(0.289 0.034 318.201);
--accent-foreground: oklch(0.817 0.033 318.291);
--destructive: oklch(0.6 0.214 34.147);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.391 0.051 318.185);
--chart-1: oklch(0.391 0.051 318.185);
--chart-2: oklch(0.2 0.013 318.267);
--chart-3: oklch(0.289 0.034 318.201);
--chart-4: oklch(0.232 0.016 318.259);
--chart-5: oklch(0.389 0.059 318.15);
}