blue for shadcn/ui

blue is a shadcn/ui theme built around a vivid indigo primary color (#3542f8) with vivid yellow accents (#f8eb35). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the vivid indigo primary (#3542f8) on an indigo-tinted background (#03040c).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#03040cblack
Foreground
#040516black
#f8f8fcghostwhite
Card
#fbfbfeghostwhite
#03040cblack
Card foreground
#040516black
#f8f8fcghostwhite
Popover
#fbfbfeghostwhite
#03040cblack
Popover foreground
#040516black
#f8f8fcghostwhite
Primary
#3542f8royalblue
#3542f8royalblue
Primary foreground
#fafaffghostwhite
#fafaffghostwhite
Secondary
#f8eb35gold
#f8eb35gold
Secondary foreground
#000000black
#000000black
Muted
#ecece4linen
#1b1b13black
Muted foreground
#4a4945darkslategray
#bab9b5silver
Accent
#f8eb35gold
#f8eb35gold
Accent foreground
#000000black
#000000black
Destructive
#e33302orangered
#fd410dorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e2e2e9gainsboro
#1a1b23black
Input
#e2e2e9gainsboro
#1a1b23black
Ring
#3542f8royalblue
#3542f8royalblue

Contrast

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

Light mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button6.13:1AA
Secondary button16.88:1AAA
Muted text7.58:1AAA
Accent16.88:1AAA
Destructive4.42:1AA Large
Dark mode
Text on background19.30:1AAA
Text on card19.30:1AAA
Primary button6.13:1AA
Secondary button16.88:1AAA
Muted text8.83:1AAA
Accent16.88:1AAA
Destructive3.55:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 283.044);
  --foreground: oklch(0.127 0.038 274.941);
  --muted: oklch(0.941 0.011 103.299);
  --muted-foreground: oklch(0.405 0.007 103.375);
  --popover: oklch(0.989 0.004 283.044);
  --popover-foreground: oklch(0.127 0.038 274.941);
  --card: oklch(0.989 0.004 283.044);
  --card-foreground: oklch(0.127 0.038 274.941);
  --border: oklch(0.916 0.009 282.938);
  --input: oklch(0.916 0.009 282.938);
  --primary: oklch(0.509 0.262 269.709);
  --primary-foreground: oklch(0.987 0.006 283.005);
  --secondary: oklch(0.921 0.183 105.11);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.921 0.183 105.11);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.597 0.216 33.493);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.509 0.262 269.709);
  --chart-1: oklch(0.509 0.262 269.709);
  --chart-2: oklch(0.921 0.183 105.11);
  --chart-3: oklch(0.921 0.183 105.11);
  --chart-4: oklch(0.926 0.177 105.198);
  --chart-5: oklch(0.507 0.269 269.184);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.022 277.499);
  --foreground: oklch(0.981 0.005 283.025);
  --muted: oklch(0.219 0.015 104.183);
  --muted-foreground: oklch(0.786 0.006 103.225);
  --popover: oklch(0.111 0.022 277.499);
  --popover-foreground: oklch(0.981 0.005 283.025);
  --card: oklch(0.111 0.022 277.499);
  --card-foreground: oklch(0.981 0.005 283.025);
  --border: oklch(0.225 0.016 281.854);
  --input: oklch(0.225 0.016 281.854);
  --primary: oklch(0.509 0.262 269.709);
  --primary-foreground: oklch(0.987 0.006 283.005);
  --secondary: oklch(0.921 0.183 105.11);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.921 0.183 105.11);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.653 0.23 34.041);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.509 0.262 269.709);
  --chart-1: oklch(0.509 0.262 269.709);
  --chart-2: oklch(0.921 0.183 105.11);
  --chart-3: oklch(0.921 0.183 105.11);
  --chart-4: oklch(0.926 0.177 105.198);
  --chart-5: oklch(0.507 0.269 269.184);
}