Blue for shadcn/ui

Blue is a shadcn/ui theme built around a deep violet primary color (#1f1631) with deep green accents (#293116). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the deep violet primary (#1f1631) on a violet-tinted background (#07050a).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#07050ablack
Foreground
#000000black
#ffffffwhite
Card
#f9f8fcghostwhite
#07050ablack
Card foreground
#000000black
#ffffffwhite
Popover
#f9f8fcghostwhite
#07050ablack
Popover foreground
#000000black
#ffffffwhite
Primary
#1f1631black
#1f1631black
Primary foreground
#b4a4d5lightsteelblue
#b4a4d5lightsteelblue
Secondary
#293116darkslategray
#293116darkslategray
Secondary foreground
#c6d5a4silver
#c6d5a4silver
Muted
#eaeee2beige
#191d11black
Muted foreground
#6a715bdimgray
#9da48edarkseagreen
Accent
#293116darkslategray
#293116darkslategray
Accent foreground
#c6d5a4silver
#c6d5a4silver
Destructive
#770d09maroon
#f0433dtomato
Destructive foreground
#fabab8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1f1631black
#1f1631black

Contrast

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

Light mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button7.54:1AAA
Secondary button8.72:1AAA
Muted text4.32:1AA Large
Accent8.72:1AAA
Destructive6.95:1AA
Dark mode
Text on background20.26:1AAA
Text on card20.26:1AAA
Primary button7.54:1AAA
Secondary button8.72:1AAA
Muted text6.64:1AA
Accent8.72:1AAA
Destructive3.76: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.981 0.006 300.674);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.943 0.016 121.054);
  --muted-foreground: oklch(0.537 0.035 121.859);
  --popover: oklch(0.981 0.006 300.674);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.006 300.674);
  --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.227 0.051 296.771);
  --primary-foreground: oklch(0.749 0.071 299.174);
  --secondary: oklch(0.297 0.045 123.542);
  --secondary-foreground: oklch(0.849 0.068 122.115);
  --accent: oklch(0.297 0.045 123.542);
  --accent-foreground: oklch(0.849 0.068 122.115);
  --destructive: oklch(0.364 0.139 28.771);
  --destructive-foreground: oklch(0.847 0.074 20.993);
  --ring: oklch(0.227 0.051 296.771);
  --chart-1: oklch(0.227 0.051 296.771);
  --chart-2: oklch(0.297 0.045 123.542);
  --chart-3: oklch(0.297 0.045 123.542);
  --chart-4: oklch(0.336 0.053 123.673);
  --chart-5: oklch(0.225 0.055 296.354);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.013 300.952);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.222 0.023 122.528);
  --muted-foreground: oklch(0.707 0.033 121.539);
  --popover: oklch(0.123 0.013 300.952);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.123 0.013 300.952);
  --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.227 0.051 296.771);
  --primary-foreground: oklch(0.749 0.071 299.174);
  --secondary: oklch(0.297 0.045 123.542);
  --secondary-foreground: oklch(0.849 0.068 122.115);
  --accent: oklch(0.297 0.045 123.542);
  --accent-foreground: oklch(0.849 0.068 122.115);
  --destructive: oklch(0.637 0.211 27.102);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.227 0.051 296.771);
  --chart-1: oklch(0.227 0.051 296.771);
  --chart-2: oklch(0.297 0.045 123.542);
  --chart-3: oklch(0.297 0.045 123.542);
  --chart-4: oklch(0.336 0.053 123.673);
  --chart-5: oklch(0.225 0.055 296.354);
}