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.jsonHarbor 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.
| Where | Pair | Light | Dark |
|---|---|---|---|
| Body text | foreground on background | 19.79:1 · Lc 106 | 18.59:1 · Lc 104 |
| Secondary text on the page | muted-foreground on background | 5.28:1 · Lc 76 | 9.87:1 · Lc 64 |
| Text in cards | card-foreground on card | 19.79:1 · Lc 106 | 17.16:1 · Lc 104 |
| Secondary text in cards | muted-foreground on card | 5.28:1 · Lc 76 | 9.11:1 · Lc 63 |
| Menus and popovers | popover-foreground on popover | 19.79:1 · Lc 106 | 17.16:1 · Lc 104 |
| Primary buttons | primary-foreground on primary | 6.71:1 · Lc 87 | 8.89:1 · Lc 62 |
| Links and outline accents | primary on background | 6.71:1 · Lc 82 | 9.18:1 · Lc 61 |
| Secondary buttons | secondary-foreground on secondary | 16.29:1 · Lc 98 | 14.47:1 · Lc 101 |
| Text on muted panels | muted-foreground on muted | 4.80:1 · Lc 70 | 7.69:1 · Lc 61 |
| Hovered menu items | accent-foreground on accent | 10.02:1 · Lc 88 | 13.11:1 · Lc 100 |
| Error messages | destructive on background | 4.77:1 · Lc 70 | 9.27:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 18.93:1 · Lc 103 | 17.16:1 · Lc 104 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 6.71:1 · Lc 87 | 8.89:1 · Lc 62 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 16.29:1 · Lc 98 | 14.47:1 · Lc 101 |
| Focus ring | ring on background | 6.71:1 | 8.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.jsonOr 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-tightThe registry item: themes.dev/r/presets/harbor.json. Free to use in any project.
: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;
}