Blues for shadcn/ui

Blues is a shadcn/ui theme built around a vivid blue primary color (#297bff) with muted light blue accents (#b3bed1). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the vivid blue primary (#297bff) on a blue-tinted background (#03070c).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#03070cblack
Foreground
#000000black
#ffffffwhite
Card
#f8f9fcghostwhite
#03070cblack
Card foreground
#000000black
#ffffffwhite
Popover
#f8f9fcghostwhite
#03070cblack
Popover foreground
#000000black
#ffffffwhite
Primary
#297bffdodgerblue
#297bffdodgerblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#c9cfd9lightgrey
#19191ablack
Secondary foreground
#2f3642darkslategray
#b0b2b5darkgray
Muted
#eaecf1lavender
#0e1115black
Muted foreground
#636363dimgray
#9c9c9cdarkgray
Accent
#b3bed1lightsteelblue
#22252bdarkslategray
Accent foreground
#1f2633darkslategray
#b8bdc7silver
Destructive
#c90d03firebrick
#e20f03red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#dfe0e2gainsboro
#222326darkslategray
Input
#dfe0e2gainsboro
#222326darkslategray
Ring
#297bffdodgerblue
#297bffdodgerblue

Contrast

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

Light mode
Text on background20.00:1AAA
Text on card20.00:1AAA
Primary button3.91:1AA Large
Secondary button7.78:1AAA
Muted text5.09:1AA
Accent8.10:1AAA
Destructive5.93:1AA
Dark mode
Text on background20.21:1AAA
Text on card20.21:1AAA
Primary button3.91:1AA Large
Secondary button8.25:1AAA
Muted text6.88:1AA
Accent8.14:1AAA
Destructive4.88:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.003 259.938);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.943 0.006 259.941);
  --muted-foreground: oklch(0.501 0 180);
  --popover: oklch(0.983 0.003 259.938);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.003 259.938);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.906 0.003 259.938);
  --input: oklch(0.906 0.003 259.938);
  --primary: oklch(0.61 0.212 259.929);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.854 0.015 259.946);
  --secondary-foreground: oklch(0.33 0.023 259.877);
  --accent: oklch(0.799 0.03 259.935);
  --accent-foreground: oklch(0.269 0.026 259.804);
  --destructive: oklch(0.528 0.212 29.635);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.61 0.212 259.929);
  --chart-1: oklch(0.61 0.212 259.929);
  --chart-2: oklch(0.854 0.015 259.946);
  --chart-3: oklch(0.799 0.03 259.935);
  --chart-4: oklch(0.878 0.012 259.945);
  --chart-5: oklch(0.61 0.217 260.017);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.015 252.33);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.177 0.01 259.91);
  --muted-foreground: oklch(0.691 0 180);
  --popover: oklch(0.124 0.015 252.33);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.124 0.015 252.33);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.256 0.006 259.946);
  --input: oklch(0.256 0.006 259.946);
  --primary: oklch(0.61 0.212 259.929);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.215 0.002 259.943);
  --secondary-foreground: oklch(0.763 0.004 259.94);
  --accent: oklch(0.264 0.012 259.926);
  --accent-foreground: oklch(0.798 0.015 259.946);
  --destructive: oklch(0.577 0.232 29.593);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.61 0.212 259.929);
  --chart-1: oklch(0.61 0.212 259.929);
  --chart-2: oklch(0.215 0.002 259.943);
  --chart-3: oklch(0.264 0.012 259.926);
  --chart-4: oklch(0.247 0.003 259.944);
  --chart-5: oklch(0.61 0.217 260.017);
}