Skip to content

Harbor, a shadcn/ui preset

A dependable blue on slate, for dashboards and SaaS.

Fonts: Inter and Inter Tight · radius 0.625rem · light and dark · lowest text contrast 4.77:1

npx shadcn@latest add https://www.themes.dev/r/presets/harbor.json
Edit in the generator

Harbor on six free blocks from themes.dev UI. Scroll inside the preview.

The colours

The main variables, light and dark. The full set of 31 per mode, sidebar and charts included, is in the CSS below.

Light

  • background#ffffff
  • foreground#070a10
  • primary#1d4ed8
  • primary-foreground#ffffff
  • secondary#eef5fe
  • muted-foreground#676c74
  • accent#e8f4ff
  • border#dfe6ef
  • destructive#e7000a
  • ring#1d4ed8
  • chart-1#9bc0ff
  • chart-2#5289ff
  • chart-3#3c6bdd
  • chart-4#2a52b6
  • chart-5#1b3c93

Dark

  • background#090e13
  • foreground#f8fafd
  • primary#87b3ff
  • primary-foreground#0e1218
  • secondary#22272d
  • muted-foreground#b3b9c2
  • accent#212d47
  • border#272c32
  • destructive#ff9693
  • ring#83aeff
  • chart-1#a0c3ff
  • chart-2#6598ff
  • chart-3#4778eb
  • chart-4#325bc0
  • chart-5#22459c

Contrast, checked

Every pair shadcn/ui draws text with, measured as WCAG 2 contrast (AA needs 4.5:1) and APCA Lc (we ask 60 for text). Focus rings need 3:1 on the page.

WherePairLightDark
Body textforeground on background19.79:1 · Lc 10618.59:1 · Lc 104
Secondary text on the pagemuted-foreground on background5.28:1 · Lc 769.87:1 · Lc 64
Text in cardscard-foreground on card19.79:1 · Lc 10617.16:1 · Lc 104
Secondary text in cardsmuted-foreground on card5.28:1 · Lc 769.11:1 · Lc 63
Menus and popoverspopover-foreground on popover19.79:1 · Lc 10617.16:1 · Lc 104
Primary buttonsprimary-foreground on primary6.71:1 · Lc 878.89:1 · Lc 62
Links and outline accentsprimary on background6.71:1 · Lc 829.18:1 · Lc 61
Secondary buttonssecondary-foreground on secondary16.29:1 · Lc 9814.47:1 · Lc 101
Text on muted panelsmuted-foreground on muted4.80:1 · Lc 707.69:1 · Lc 61
Hovered menu itemsaccent-foreground on accent10.02:1 · Lc 8813.11:1 · Lc 100
Error messagesdestructive on background4.77:1 · Lc 709.27:1 · Lc 61
Sidebarsidebar-foreground on sidebar18.93:1 · Lc 10317.16:1 · Lc 104
Sidebar active itemsidebar-primary-foreground on sidebar-primary6.71:1 · Lc 878.89:1 · Lc 62
Sidebar hoversidebar-accent-foreground on sidebar-accent16.29:1 · Lc 9814.47:1 · Lc 101
Focus ringring on background6.71:18.75:1

Use it

With the shadcn CLI, in a project set up with shadcn init:

npx shadcn@latest add https://www.themes.dev/r/presets/harbor.json

Or paste the CSS into globals.css (Next.js) or your main stylesheet (Vite, Astro), replacing the :root and .dark values that are there.

Then load the fonts:

npm i @fontsource-variable/inter @fontsource-variable/inter-tight

The registry item: themes.dev/r/presets/harbor.json. Free to use in any project.

globals.css
:root {
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0.014 257);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0.014 257);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0.014 257);
  --primary: oklch(0.488 0.217 264.38);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.967 0.014 257);
  --secondary-foreground: oklch(0.205 0.014 257);
  --muted: oklch(0.967 0.014 257);
  --muted-foreground: oklch(0.53 0.014 257);
  --accent: oklch(0.961 0.02 245.39);
  --accent-foreground: oklch(0.36 0.14 264.38);
  --destructive: oklch(0.583 0.239 28.5);
  --border: oklch(0.922 0.014 257);
  --input: oklch(0.87 0.014 257);
  --ring: oklch(0.488 0.217 264.38);
  --chart-1: oklch(0.804 0.099 260.96);
  --chart-2: oklch(0.652 0.185 263.45);
  --chart-3: oklch(0.56 0.182 264.38);
  --chart-4: oklch(0.47 0.165 264.38);
  --chart-5: oklch(0.39 0.148 264.38);
  --sidebar: oklch(0.984 0.009 235.36);
  --sidebar-foreground: oklch(0.145 0.014 257);
  --sidebar-primary: oklch(0.488 0.217 264.38);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.967 0.014 257);
  --sidebar-accent-foreground: oklch(0.205 0.014 257);
  --sidebar-border: oklch(0.922 0.014 257);
  --sidebar-ring: oklch(0.488 0.217 264.38);
}

.dark {
  --background: oklch(0.16 0.014 257);
  --foreground: oklch(0.985 0.004 257);
  --card: oklch(0.205 0.014 257);
  --card-foreground: oklch(0.985 0.004 257);
  --popover: oklch(0.205 0.014 257);
  --popover-foreground: oklch(0.985 0.004 257);
  --primary: oklch(0.766 0.12 261.02);
  --primary-foreground: oklch(0.18 0.014 257);
  --secondary: oklch(0.269 0.014 257);
  --secondary-foreground: oklch(0.985 0.004 257);
  --muted: oklch(0.269 0.014 257);
  --muted-foreground: oklch(0.785 0.014 257);
  --accent: oklch(0.3 0.05 264.38);
  --accent-foreground: oklch(0.985 0.004 257);
  --destructive: oklch(0.782 0.127 22);
  --border: oklch(0.29 0.014 257);
  --input: oklch(0.34 0.014 257);
  --ring: oklch(0.753 0.126 262.07);
  --chart-1: oklch(0.814 0.093 260.79);
  --chart-2: oklch(0.692 0.161 262.9);
  --chart-3: oklch(0.6 0.182 264.38);
  --chart-4: oklch(0.5 0.165 264.38);
  --chart-5: oklch(0.42 0.148 264.38);
  --sidebar: oklch(0.205 0.014 257);
  --sidebar-foreground: oklch(0.985 0.004 257);
  --sidebar-primary: oklch(0.766 0.12 261.02);
  --sidebar-primary-foreground: oklch(0.18 0.014 257);
  --sidebar-accent: oklch(0.269 0.014 257);
  --sidebar-accent-foreground: oklch(0.985 0.004 257);
  --sidebar-border: oklch(0.29 0.014 257);
  --sidebar-ring: oklch(0.753 0.126 262.07);
}

@theme inline {
  --font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-heading: "Inter Tight Variable", "Inter Tight", ui-sans-serif, system-ui, sans-serif;
}

More shadcn/ui presets

All 37 presets