Generate feedback colors (success, warning, error, and info) for shadcn/ui

Go to generator

10000+Themes for shadcn/ui

Rectangular for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background20.18:1AAA
Text on card20.18:1AAA
Primary button7.43:1AAA
Secondary button7.90:1AAA
Muted text5.98:1AA
Accent8.05:1AAA
Destructive6.92:1AA
Dark mode
Text on background19.75:1AAA
Text on card19.75:1AAA
Primary button7.43:1AAA
Secondary button7.88:1AAA
Muted text7.62:1AAA
Accent8.04:1AAA
Destructive4.36:1AA Large

CSS variables

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);
}