Rectangular for shadcn/ui

Rectangular is a shadcn/ui theme built around a muted violet primary color (#796397) with muted purple accents (#946397). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted violet primary (#796397) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#fcfbfewhite
#050307black
Foreground
#020104black
#faf8fbghostwhite
Card
#faf8fcghostwhite
#07050ablack
Card foreground
#000000black
#fcfcfdwhite
Popover
#faf8fcghostwhite
#07050ablack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#796397slategray
#796397slategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#636697slategray
#636697slategray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d6d7e5gainsboro
#1a1b29black
Muted foreground
#3f4055darkslategray
#aaabc0darkgray
Accent
#946397gray
#946397gray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#621609maroon
#d23014firebrick
Destructive foreground
#f7b2a6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#796397slategray
#796397slategray

Contrast

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

Light mode
Text on background20.24:1AAA
Text on card19.84:1AAA
Primary button5.19:1AA
Secondary button5.40:1AA
Muted text7.10:1AAA
Accent4.69:1AA
Destructive7.23:1AAA
Dark mode
Text on background19.41:1AAA
Text on card19.76:1AAA
Primary button5.19:1AA
Secondary button5.40:1AA
Muted text7.57:1AAA
Accent4.69:1AA
Destructive5.03:1AA

CSS variables

Paste this into your globals.css to use Rectangular in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 305.697);
  --foreground: oklch(0.079 0.019 307.154);
  --muted: oklch(0.883 0.019 282.725);
  --muted-foreground: oklch(0.38 0.035 281.384);
  --popover: oklch(0.981 0.006 305.654);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.006 305.654);
  --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.542 0.084 303.621);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.528 0.077 280.275);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.57 0.097 324.445);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.33 0.11 32.364);
  --destructive-foreground: oklch(0.826 0.082 30.152);
  --ring: oklch(0.542 0.084 303.621);
  --chart-1: oklch(0.542 0.084 303.621);
  --chart-2: oklch(0.528 0.077 280.275);
  --chart-3: oklch(0.57 0.097 324.445);
  --chart-4: oklch(0.556 0.074 280.528);
  --chart-5: oklch(0.536 0.096 303.266);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.012 306.387);
  --foreground: oklch(0.982 0.004 305.68);
  --muted: oklch(0.226 0.028 280.777);
  --muted-foreground: oklch(0.748 0.03 282.409);
  --popover: oklch(0.123 0.014 306.387);
  --popover-foreground: oklch(0.991 0.002 305.71);
  --card: oklch(0.123 0.014 306.387);
  --card-foreground: oklch(0.991 0.002 305.71);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.542 0.084 303.621);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.528 0.077 280.275);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.57 0.097 324.445);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.565 0.202 32.112);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.542 0.084 303.621);
  --chart-1: oklch(0.542 0.084 303.621);
  --chart-2: oklch(0.528 0.077 280.275);
  --chart-3: oklch(0.57 0.097 324.445);
  --chart-4: oklch(0.556 0.074 280.528);
  --chart-5: oklch(0.536 0.096 303.266);
}