United for shadcn/ui

United is a shadcn/ui theme built around a muted indigo primary color (#4e4a87) with muted green accents (#4a874e). The light mode uses a neutral background (#f7f6fd). Dark mode keeps the muted indigo primary (#4e4a87) on a neutral background (#020208).

Color palette

TokenLightDark
Background
#f7f6fdghostwhite
#020208black
Foreground
#010104black
#f9f9faghostwhite
Card
#f7f6fdghostwhite
#020208black
Card foreground
#010104black
#f9f9faghostwhite
Popover
#f7f6fdghostwhite
#020208black
Popover foreground
#010104black
#f9f9faghostwhite
Primary
#4e4a87darkslateblue
#4e4a87darkslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#874e4asienna
#874e4asienna
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ece4e4linen
#1b1313black
Muted foreground
#504a49darkslategray
#b6b0afdarkgray
Accent
#4a874eseagreen
#4a874eseagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#671304maroon
#e12a09orangered
Destructive foreground
#fbafa2lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4e4a87darkslateblue
#4e4a87darkslateblue

Contrast

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

Light mode
Text on background19.46:1AAA
Text on card19.46:1AAA
Primary button7.89:1AAA
Secondary button6.51:1AA
Muted text6.96:1AA
Accent4.31:1AA Large
Destructive7.03:1AAA
Dark mode
Text on background19.65:1AAA
Text on card19.65:1AAA
Primary button7.89:1AAA
Secondary button6.51:1AA
Muted text8.52:1AAA
Accent4.31:1AA Large
Destructive4.62:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.977 0.009 289.301);
  --foreground: oklch(0.075 0.018 285.811);
  --muted: oklch(0.926 0.008 22.317);
  --muted-foreground: oklch(0.414 0.008 22.43);
  --popover: oklch(0.977 0.009 289.301);
  --popover-foreground: oklch(0.075 0.018 285.811);
  --card: oklch(0.977 0.009 289.301);
  --card-foreground: oklch(0.075 0.018 285.811);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.443 0.098 284.706);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.49 0.077 24.629);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.567 0.106 145.43);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.336 0.119 32.517);
  --destructive-foreground: oklch(0.824 0.092 30.269);
  --ring: oklch(0.443 0.098 284.706);
  --chart-1: oklch(0.443 0.098 284.706);
  --chart-2: oklch(0.49 0.077 24.629);
  --chart-3: oklch(0.567 0.106 145.43);
  --chart-4: oklch(0.515 0.082 24.656);
  --chart-5: oklch(0.437 0.108 284.022);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.094 0.023 285.706);
  --foreground: oklch(0.984 0.001 289.45);
  --muted: oklch(0.198 0.013 23.051);
  --muted-foreground: oklch(0.761 0.007 22.312);
  --popover: oklch(0.094 0.023 285.706);
  --popover-foreground: oklch(0.984 0.001 289.45);
  --card: oklch(0.094 0.023 285.706);
  --card-foreground: oklch(0.984 0.001 289.45);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.443 0.098 284.706);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.49 0.077 24.629);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.567 0.106 145.43);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.587 0.22 31.652);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.443 0.098 284.706);
  --chart-1: oklch(0.443 0.098 284.706);
  --chart-2: oklch(0.49 0.077 24.629);
  --chart-3: oklch(0.567 0.106 145.43);
  --chart-4: oklch(0.515 0.082 24.656);
  --chart-5: oklch(0.437 0.108 284.022);
}