Proportion for shadcn/ui

Proportion is a shadcn/ui theme built around a purple primary color (#8d1c8d) with teal accents (#1c8d8d). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the purple primary (#8d1c8d) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#030203black
Foreground
#000000black
#f8f7f8whitesmoke
Card
#fdfcfdwhite
#030203black
Card foreground
#000000black
#f8f7f8whitesmoke
Popover
#fdfcfdwhite
#030203black
Popover foreground
#000000black
#f8f7f8whitesmoke
Primary
#8d1c8ddarkmagenta
#8d1c8ddarkmagenta
Primary foreground
#f9e1f9lavenderblush
#f9e1f9lavenderblush
Secondary
#8d8d1colive
#8d8d1colive
Secondary foreground
#000000black
#000000black
Muted
#e8e8d9gainsboro
#262617black
Muted foreground
#69694fdimgray
#b0b096darkgray
Accent
#1c8d8ddarkcyan
#1c8d8ddarkcyan
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#9a0b04darkred
#fa3d33tomato
Destructive foreground
#fed4d2pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8d1c8ddarkmagenta
#8d1c8ddarkmagenta

Contrast

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

Light mode
Text on background20.47:1AAA
Text on card20.47:1AAA
Primary button6.42:1AA
Secondary button5.92:1AA
Muted text4.54:1AA
Accent4.02:1AA Large
Destructive6.40:1AA
Dark mode
Text on background19.39:1AAA
Text on card19.39:1AAA
Primary button6.42:1AA
Secondary button5.92:1AA
Muted text6.90:1AA
Accent4.02:1AA Large
Destructive3.63:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 325.6);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.927 0.02 106.79);
  --muted-foreground: oklch(0.512 0.039 107.689);
  --popover: oklch(0.992 0.003 325.6);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0.003 325.6);
  --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.462 0.191 328.13);
  --primary-foreground: oklch(0.937 0.041 325.898);
  --secondary: oklch(0.622 0.127 109.578);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.584 0.094 194.896);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.436 0.173 29.653);
  --destructive-foreground: oklch(0.906 0.047 21.602);
  --ring: oklch(0.462 0.191 328.13);
  --chart-1: oklch(0.462 0.191 328.13);
  --chart-2: oklch(0.622 0.127 109.578);
  --chart-3: oklch(0.584 0.094 194.896);
  --chart-4: oklch(0.663 0.135 109.587);
  --chart-5: oklch(0.466 0.196 328.168);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.013 326.612);
  --foreground: oklch(0.976 0.003 325.596);
  --muted: oklch(0.265 0.027 108.086);
  --muted-foreground: oklch(0.75 0.036 107.229);
  --popover: oklch(0.088 0.013 326.612);
  --popover-foreground: oklch(0.976 0.003 325.596);
  --card: oklch(0.088 0.013 326.612);
  --card-foreground: oklch(0.976 0.003 325.596);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.462 0.191 328.13);
  --primary-foreground: oklch(0.937 0.041 325.898);
  --secondary: oklch(0.622 0.127 109.578);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.584 0.094 194.896);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.647 0.226 28.358);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.462 0.191 328.13);
  --chart-1: oklch(0.462 0.191 328.13);
  --chart-2: oklch(0.622 0.127 109.578);
  --chart-3: oklch(0.584 0.094 194.896);
  --chart-4: oklch(0.663 0.135 109.587);
  --chart-5: oklch(0.466 0.196 328.168);
}