Rectangular for shadcn/ui

Rectangular is a shadcn/ui theme built around a near-black primary color (#08000a) with near-black accents (#020a00). The light mode uses a neutral background (#fbf7fc). Dark mode keeps the near-black primary (#08000a) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#fbf7fcghostwhite
#030104black
Foreground
#0e0212black
#f8f6f9whitesmoke
Card
#f9f4fbghostwhite
#070208black
Card foreground
#0b020eblack
#faf9fbghostwhite
Popover
#fbf7fcghostwhite
#030104black
Popover foreground
#0e0212black
#f8f6f9whitesmoke
Primary
#08000ablack
#08000ablack
Primary foreground
#e9a4feplum
#e9a4feplum
Secondary
#020a00black
#020a00black
Secondary foreground
#33d402limegreen
#33d402limegreen
Muted
#d5e8cfgainsboro
#1d3017black
Muted foreground
#555954dimgray
#a7aba6darkgray
Accent
#020a00black
#020a00black
Accent foreground
#33d402limegreen
#33d402limegreen
Destructive
#980101darkred
#e40101red
Destructive foreground
#ffccccpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#08000ablack
#08000ablack

Contrast

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

Light mode
Text on background19.18:1AAA
Text on card18.78:1AAA
Primary button11.04:1AAA
Secondary button10.08:1AAA
Muted text5.51:1AA
Accent10.08:1AAA
Destructive6.29:1AA
Dark mode
Text on background19.33:1AAA
Text on card19.58:1AAA
Primary button11.04:1AAA
Secondary button10.08:1AAA
Muted text6.04:1AA
Accent10.08:1AAA
Destructive4.86:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 318.322);
  --foreground: oklch(0.13 0.045 319.392);
  --muted: oklch(0.909 0.039 138.377);
  --muted-foreground: oklch(0.46 0.01 138.352);
  --popover: oklch(0.982 0.008 318.322);
  --popover-foreground: oklch(0.13 0.045 319.392);
  --card: oklch(0.973 0.011 318.319);
  --card-foreground: oklch(0.116 0.04 320.381);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.097 0.045 321.935);
  --primary-foreground: oklch(0.816 0.142 318.112);
  --secondary: oklch(0.13 0.037 135.396);
  --secondary-foreground: oklch(0.759 0.249 141.03);
  --accent: oklch(0.13 0.037 135.396);
  --accent-foreground: oklch(0.759 0.249 141.03);
  --destructive: oklch(0.428 0.175 29.173);
  --destructive-foreground: oklch(0.89 0.057 18.287);
  --ring: oklch(0.097 0.045 321.935);
  --chart-1: oklch(0.097 0.045 321.935);
  --chart-2: oklch(0.13 0.037 135.396);
  --chart-3: oklch(0.13 0.037 135.396);
  --chart-4: oklch(0.19 0.057 137.046);
  --chart-5: oklch(0.096 0.046 322.069);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.084 0.02 320.316);
  --foreground: oklch(0.976 0.004 318.326);
  --muted: oklch(0.286 0.05 138.664);
  --muted-foreground: oklch(0.736 0.009 138.342);
  --popover: oklch(0.084 0.02 320.316);
  --popover-foreground: oklch(0.976 0.004 318.326);
  --card: oklch(0.105 0.025 320.316);
  --card-foreground: oklch(0.984 0.003 318.328);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.097 0.045 321.935);
  --primary-foreground: oklch(0.816 0.142 318.112);
  --secondary: oklch(0.13 0.037 135.396);
  --secondary-foreground: oklch(0.759 0.249 141.03);
  --accent: oklch(0.13 0.037 135.396);
  --accent-foreground: oklch(0.759 0.249 141.03);
  --destructive: oklch(0.578 0.237 29.197);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.097 0.045 321.935);
  --chart-1: oklch(0.097 0.045 321.935);
  --chart-2: oklch(0.13 0.037 135.396);
  --chart-3: oklch(0.13 0.037 135.396);
  --chart-4: oklch(0.19 0.057 137.046);
  --chart-5: oklch(0.096 0.046 322.069);
}