Ledger, a shadcn/ui preset
Navy ink on warm paper, for a software product that wants to look settled. It comes from Ledger, one of our website themes.
Fonts: Public Sans · radius 0.125rem · light and dark · lowest text contrast 5.69:1
npx shadcn@latest add https://www.themes.dev/r/presets/ledger.jsonLedger 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#fbf8f1
- foreground#1c2130
- primary#1f3c7e
- primary-foreground#ffffff
- secondary#f1ece3
- muted-foreground#575c68
- accent#e5e8f1
- border#e2daca
- destructive#ae2b1d
- ring#1f3c7e
- chart-1#9ac0ff
- chart-2#7091d5
- chart-3#5773ae
- chart-4#41598d
- chart-5#2f4470
Dark
- background#14171e
- foreground#ece7db
- primary#a9bcf2
- primary-foreground#121a30
- secondary#232831
- muted-foreground#c6c8ce
- accent#232d49
- border#2d323d
- destructive#ff9989
- ring#a9bcf2
- chart-1#9fc3ff
- chart-2#7c9de2
- chart-3#627fbb
- chart-4#496296
- chart-5#364c79
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 | 15.14:1 · Lc 99 | 14.54:1 · Lc 92 |
| Secondary text on the page | muted-foreground on background | 6.31:1 · Lc 79 | 10.71:1 · Lc 72 |
| Text in cards | card-foreground on card | 15.77:1 · Lc 102 | 13.36:1 · Lc 91 |
| Secondary text in cards | muted-foreground on card | 6.57:1 · Lc 82 | 9.84:1 · Lc 71 |
| Menus and popovers | popover-foreground on popover | 15.77:1 · Lc 102 | 13.36:1 · Lc 91 |
| Primary buttons | primary-foreground on primary | 10.47:1 · Lc 98 | 9.17:1 · Lc 66 |
| Links and outline accents | primary on background | 9.88:1 · Lc 90 | 9.53:1 · Lc 66 |
| Secondary buttons | secondary-foreground on secondary | 13.66:1 · Lc 92 | 12.05:1 · Lc 89 |
| Text on muted panels | muted-foreground on muted | 5.69:1 · Lc 72 | 8.87:1 · Lc 70 |
| Hovered menu items | accent-foreground on accent | 8.54:1 · Lc 80 | 8.44:1 · Lc 71 |
| Error messages | destructive on background | 6.28:1 · Lc 77 | 8.71:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 14.62:1 · Lc 97 | 13.54:1 · Lc 91 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 10.47:1 · Lc 98 | 9.17:1 · Lc 66 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 13.66:1 · Lc 92 | 12.05:1 · Lc 89 |
| Focus ring | ring on background | 9.88:1 | 9.53: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/ledger.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 font:
npm i @fontsource-variable/public-sansThe registry item: themes.dev/r/presets/ledger.json. Free to use in any project.
:root {
--radius: 0.125rem;
--background: oklch(0.98 0.01 87.47);
--foreground: oklch(0.25 0.03 269.96);
--card: oklch(0.994 0.007 88.64);
--card-foreground: oklch(0.25 0.03 269.96);
--popover: oklch(0.994 0.007 88.64);
--popover-foreground: oklch(0.25 0.03 269.96);
--primary: oklch(0.374 0.117 263.8);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.945 0.014 87.47);
--secondary-foreground: oklch(0.25 0.03 269.96);
--muted: oklch(0.945 0.014 87.47);
--muted-foreground: oklch(0.475 0.02 267.59);
--accent: oklch(0.931 0.013 271.28);
--accent-foreground: oklch(0.374 0.117 263.8);
--destructive: oklch(0.496 0.17 30.16);
--border: oklch(0.89 0.023 84.59);
--input: oklch(0.606 0.03 85.66);
--ring: oklch(0.374 0.117 263.8);
--chart-1: oklch(0.804 0.099 260.32);
--chart-2: oklch(0.66 0.108 263.8);
--chart-3: oklch(0.56 0.098 263.8);
--chart-4: oklch(0.47 0.089 263.8);
--chart-5: oklch(0.39 0.08 263.8);
--sidebar: oklch(0.968 0.01 87.47);
--sidebar-foreground: oklch(0.25 0.03 269.96);
--sidebar-primary: oklch(0.374 0.117 263.8);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.945 0.014 87.47);
--sidebar-accent-foreground: oklch(0.25 0.03 269.96);
--sidebar-border: oklch(0.89 0.023 84.59);
--sidebar-ring: oklch(0.374 0.117 263.8);
}
.dark {
--background: oklch(0.205 0.015 266.85);
--foreground: oklch(0.929 0.017 88);
--card: oklch(0.24 0.02 267.83);
--card-foreground: oklch(0.929 0.017 88);
--popover: oklch(0.24 0.02 267.83);
--popover-foreground: oklch(0.929 0.017 88);
--primary: oklch(0.8 0.08 269.5);
--primary-foreground: oklch(0.223 0.045 267.59);
--secondary: oklch(0.275 0.019 266.85);
--secondary-foreground: oklch(0.929 0.017 88);
--muted: oklch(0.275 0.019 266.85);
--muted-foreground: oklch(0.833 0.009 271.31);
--accent: oklch(0.302 0.053 268.22);
--accent-foreground: oklch(0.845 0.059 270.29);
--destructive: oklch(0.786 0.125 29.79);
--border: oklch(0.317 0.021 265.92);
--input: oklch(0.558 0.02 264.4);
--ring: oklch(0.8 0.08 269.5);
--chart-1: oklch(0.814 0.093 260.1);
--chart-2: oklch(0.7 0.108 263.8);
--chart-3: oklch(0.6 0.098 263.8);
--chart-4: oklch(0.5 0.089 263.8);
--chart-5: oklch(0.42 0.08 263.8);
--sidebar: oklch(0.235 0.015 266.85);
--sidebar-foreground: oklch(0.929 0.017 88);
--sidebar-primary: oklch(0.8 0.08 269.5);
--sidebar-primary-foreground: oklch(0.223 0.045 267.59);
--sidebar-accent: oklch(0.275 0.019 266.85);
--sidebar-accent-foreground: oklch(0.929 0.017 88);
--sidebar-border: oklch(0.317 0.021 265.92);
--sidebar-ring: oklch(0.8 0.08 269.5);
}
@theme inline {
--font-sans: "Public Sans Variable", "Public Sans", ui-sans-serif, system-ui, sans-serif;
--font-heading: "Public Sans Variable", "Public Sans", ui-sans-serif, system-ui, sans-serif;
}
The whole site
Ledger started as Ledger, a website theme
Ledger is a complete site for SaaS and software: every page, the content model and a live demo, built from the same blocks, in Astro and Next.js + Sanity. It comes with UI Pro, from €199 once, with every other theme.
