Blue for shadcn/ui

Blue is a shadcn/ui theme built around a vivid blue primary color (#0020f0) with muted light blue accents (#dbdce1). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the vivid blue primary (#0020f0) on a neutral background (#010204).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#010204black
Foreground
#000000black
#ffffffwhite
Card
#fbfbfeghostwhite
#010204black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfbfeghostwhite
#010204black
Popover foreground
#000000black
#ffffffwhite
Primary
#0020f0blue
#0020f0blue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dbdce1gainsboro
#141519black
Secondary foreground
#3f404bdarkslategray
#a7aab9darkgray
Muted
#dcdce0gainsboro
#1f1f23black
Muted foreground
#4e505adarkslategray
#a5a7b1darkgray
Accent
#dbdce1gainsboro
#141519black
Accent foreground
#3f404bdarkslategray
#a7aab9darkgray
Destructive
#aa1513firebrick
#e6211ecrimson
Destructive foreground
#fdf1f1lavenderblush
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0020f0blue
#0020f0blue

Contrast

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

Light mode
Text on background20.39:1AAA
Text on card20.39:1AAA
Primary button8.53:1AAA
Secondary button7.47:1AAA
Muted text5.86:1AA
Accent7.47:1AAA
Destructive6.73:1AA
Dark mode
Text on background20.79:1AAA
Text on card20.79:1AAA
Primary button8.53:1AAA
Secondary button7.88:1AAA
Muted text6.82:1AA
Accent7.88:1AAA
Destructive4.55:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 279.295);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.896 0.005 279.248);
  --muted-foreground: oklch(0.433 0.017 278.724);
  --popover: oklch(0.99 0.003 279.295);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.99 0.003 279.295);
  --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.448 0.288 264.207);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.894 0.007 279.221);
  --secondary-foreground: oklch(0.375 0.018 278.553);
  --accent: oklch(0.894 0.007 279.221);
  --accent-foreground: oklch(0.375 0.018 278.553);
  --destructive: oklch(0.472 0.181 28.348);
  --destructive-foreground: oklch(0.969 0.013 18.569);
  --ring: oklch(0.448 0.288 264.207);
  --chart-1: oklch(0.448 0.288 264.207);
  --chart-2: oklch(0.894 0.007 279.221);
  --chart-3: oklch(0.894 0.007 279.221);
  --chart-4: oklch(0.919 0.005 279.252);
  --chart-5: oklch(0.45 0.293 263.955);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.08 0.013 273.336);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.242 0.008 278.845);
  --muted-foreground: oklch(0.729 0.015 279.029);
  --popover: oklch(0.08 0.013 273.336);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.08 0.013 273.336);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.448 0.288 264.207);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.197 0.009 278.629);
  --secondary-foreground: oklch(0.74 0.022 278.882);
  --accent: oklch(0.197 0.009 278.629);
  --accent-foreground: oklch(0.74 0.022 278.882);
  --destructive: oklch(0.592 0.227 28.325);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.448 0.288 264.207);
  --chart-1: oklch(0.448 0.288 264.207);
  --chart-2: oklch(0.197 0.009 278.629);
  --chart-3: oklch(0.197 0.009 278.629);
  --chart-4: oklch(0.229 0.011 278.545);
  --chart-5: oklch(0.45 0.293 263.955);
}