Nord for shadcn/ui

Nord is a shadcn/ui theme built around a deep blue primary color (#28404d) with muted light blue accents (#bfc9cf). The light mode uses a neutral background (#ffffff). Dark mode switches to a blue primary (#5e81ac) on a blue-tinted background (#2e3440).

Color palette

TokenLightDark
Background
#ffffffwhite
#2e3440darkslategray
Foreground
#02090dblack
#d8dee9gainsboro
Card
#ffffffwhite
#3b4252darkslategray
Card foreground
#02090dblack
#d8dee9gainsboro
Popover
#ffffffwhite
#070b0eblack
Popover foreground
#02090dblack
#fcfdfdwhite
Primary
#28404ddarkslategray
#5e81acsteelblue
Primary foreground
#c6d8e1lightgrey
#d8dee9gainsboro
Secondary
#d8dcdegainsboro
#8fbcbbdarkgray
Secondary foreground
#3d4448darkslategray
#d8dee9gainsboro
Muted
#eaf1f5whitesmoke
#0a1115black
Muted foreground
#545b5fdimgray
#a0a7abdarkgray
Accent
#bfc9cfsilver
#242e33darkslategray
Accent foreground
#273034darkslategray
#bac8cfsilver
Destructive
#781402maroon
#bf616aindianred
Destructive foreground
#fdbbaflightpink
#d8dee9gainsboro
Border
#f1f3f4whitesmoke
#4c566adimgray
Input
#f1f3f4whitesmoke
#202527darkslategray
Ring
#28404ddarkslategray
#28404ddarkslategray

Contrast

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

Light mode
Text on background20.04:1AAA
Text on card20.04:1AAA
Primary button7.39:1AAA
Secondary button7.19:1AAA
Muted text6.07:1AA
Accent8.01:1AAA
Destructive6.79:1AA
Dark mode
Text on background9.24:1AAA
Text on card7.44:1AAA
Primary button2.98:1Fail
Secondary button1.54:1Fail
Muted text7.80:1AAA
Accent8.12:1AAA
Destructive3.02:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.134 0.018 224.222);
  --muted: oklch(0.955 0.01 230.797);
  --muted-foreground: oklch(0.466 0.011 230.988);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.134 0.018 224.222);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.134 0.018 224.222);
  --border: oklch(0.962 0.002 230.69);
  --input: oklch(0.962 0.002 230.69);
  --primary: oklch(0.358 0.037 232.715);
  --primary-foreground: oklch(0.871 0.023 231.04);
  --secondary: oklch(0.893 0.005 230.734);
  --secondary-foreground: oklch(0.381 0.011 231.085);
  --accent: oklch(0.83 0.014 230.89);
  --accent-foreground: oklch(0.302 0.014 231.387);
  --destructive: oklch(0.372 0.136 32.36);
  --destructive-foreground: oklch(0.85 0.079 30.092);
  --ring: oklch(0.358 0.037 232.715);
  --chart-1: oklch(0.358 0.037 232.715);
  --chart-2: oklch(0.893 0.005 230.734);
  --chart-3: oklch(0.83 0.014 230.89);
  --chart-4: oklch(0.916 0.004 230.716);
  --chart-5: oklch(0.359 0.04 232.988);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.324 0.023 264.182);
  --foreground: oklch(0.899 0.016 262.744);
  --muted: oklch(0.172 0.014 232.122);
  --muted-foreground: oklch(0.725 0.01 230.844);
  --popover: oklch(0.147 0.01 229.64);
  --popover-foreground: oklch(0.992 0.001 230.674);
  --card: oklch(0.379 0.029 266.472);
  --card-foreground: oklch(0.899 0.016 262.744);
  --border: oklch(0.452 0.035 264.131);
  --input: oklch(0.26 0.008 231.126);
  --primary: oklch(0.594 0.077 254.032);
  --primary-foreground: oklch(0.899 0.016 262.744);
  --secondary: oklch(0.763 0.048 194.495);
  --secondary-foreground: oklch(0.899 0.016 262.744);
  --accent: oklch(0.293 0.017 231.618);
  --accent-foreground: oklch(0.823 0.018 230.977);
  --destructive: oklch(0.606 0.121 15.347);
  --destructive-foreground: oklch(0.899 0.016 262.744);
  --ring: oklch(0.358 0.037 232.715);
  --chart-1: oklch(0.594 0.077 254.032);
  --chart-2: oklch(0.763 0.048 194.495);
  --chart-3: oklch(0.293 0.017 231.618);
  --chart-4: oklch(0.783 0.044 194.61);
  --chart-5: oklch(0.593 0.084 254.105);
}