Width for shadcn/ui

Width is a shadcn/ui theme built around a vivid deep blue primary color (#020417) with vivid deep violet accents (#0b0217). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the vivid deep blue primary (#020417) on a blue-tinted background (#04040c).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#04040cblack
Foreground
#030412black
#fcfcfdwhite
Card
#f8f8fcghostwhite
#04040cblack
Card foreground
#030412black
#fcfcfdwhite
Popover
#f8f8fcghostwhite
#04040cblack
Popover foreground
#030412black
#fcfcfdwhite
Primary
#020417black
#020417black
Primary foreground
#b9bff9lightsteelblue
#b9bff9lightsteelblue
Secondary
#020f17black
#020f17black
Secondary foreground
#5bb5f1cornflowerblue
#5bb5f1cornflowerblue
Muted
#e7ebeflavender
#101518black
Muted foreground
#464e53darkslategray
#acb4b9darkgray
Accent
#0b0217black
#0b0217black
Accent foreground
#d2b9f9thistle
#d2b9f9thistle
Destructive
#cc4b00chocolate
#ff6105orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#020417black
#020417black

Contrast

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

Light mode
Text on background19.26:1AAA
Text on card19.26:1AAA
Primary button11.49:1AAA
Secondary button8.60:1AAA
Muted text7.09:1AAA
Accent11.63:1AAA
Destructive4.59:1AA
Dark mode
Text on background19.91:1AAA
Text on card19.91:1AAA
Primary button11.49:1AAA
Secondary button8.60:1AAA
Muted text8.71:1AAA
Accent11.63:1AAA
Destructive6.95:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 281.205);
  --foreground: oklch(0.117 0.033 272.43);
  --muted: oklch(0.939 0.007 236.54);
  --muted-foreground: oklch(0.418 0.013 236.882);
  --popover: oklch(0.981 0.005 281.205);
  --popover-foreground: oklch(0.117 0.033 272.43);
  --card: oklch(0.981 0.005 281.205);
  --card-foreground: oklch(0.117 0.033 272.43);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.122 0.046 269.318);
  --primary-foreground: oklch(0.82 0.082 279.496);
  --secondary: oklch(0.159 0.028 235.296);
  --secondary-foreground: oklch(0.742 0.122 240.401);
  --accent: oklch(0.127 0.052 301.567);
  --accent-foreground: oklch(0.828 0.092 302.727);
  --destructive: oklch(0.581 0.177 41.582);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.122 0.046 269.318);
  --chart-1: oklch(0.122 0.046 269.318);
  --chart-2: oklch(0.159 0.028 235.296);
  --chart-3: oklch(0.127 0.052 301.567);
  --chart-4: oklch(0.199 0.039 239.846);
  --chart-5: oklch(0.12 0.048 268.358);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.114 0.021 275.658);
  --foreground: oklch(0.991 0.001 281.269);
  --muted: oklch(0.193 0.01 237.251);
  --muted-foreground: oklch(0.765 0.011 236.64);
  --popover: oklch(0.114 0.021 275.658);
  --popover-foreground: oklch(0.991 0.001 281.269);
  --card: oklch(0.114 0.021 275.658);
  --card-foreground: oklch(0.991 0.001 281.269);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.122 0.046 269.318);
  --primary-foreground: oklch(0.82 0.082 279.496);
  --secondary: oklch(0.159 0.028 235.296);
  --secondary-foreground: oklch(0.742 0.122 240.401);
  --accent: oklch(0.127 0.052 301.567);
  --accent-foreground: oklch(0.828 0.092 302.727);
  --destructive: oklch(0.689 0.208 41.645);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.122 0.046 269.318);
  --chart-1: oklch(0.122 0.046 269.318);
  --chart-2: oklch(0.159 0.028 235.296);
  --chart-3: oklch(0.127 0.052 301.567);
  --chart-4: oklch(0.199 0.039 239.846);
  --chart-5: oklch(0.12 0.048 268.358);
}