Offset, a shadcn/ui preset
Pure ink and white with Archivo: the agency look, no colour to hide behind. It comes from Offset, one of our website themes.
Fonts: Archivo · radius 0rem · light and dark · lowest text contrast 6.21:1
npx shadcn@latest add https://www.themes.dev/r/presets/offset.jsonOffset 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#0b0b0c
- primary#0b0b0c
- primary-foreground#ffffff
- secondary#f6f2f3
- muted-foreground#5a5a5a
- accent#f4f4f2
- border#e3e3e0
- destructive#b42318
- ring#0b0b0c
- chart-1#c1c1c1
- chart-2#929292
- chart-3#747474
- chart-4#5b5b5b
- chart-5#454545
Dark
- background#0b0b0c
- foreground#f5f5f3
- primary#f5f5f3
- primary-foreground#0b0b0c
- secondary#1a1a1d
- muted-foreground#b5b5b3
- accent#1d1d1e
- border#262627
- destructive#ff9585
- ring#f5f5f3
- chart-1#c4c4c4
- chart-2#9e9e9e
- chart-3#808080
- chart-4#636363
- chart-5#4d4d4d
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.67:1 · Lc 106 | 18.05:1 · Lc 101 |
| Secondary text on the page | muted-foreground on background | 6.89:1 · Lc 84 | 9.63:1 · Lc 62 |
| Text in cards | card-foreground on card | 19.67:1 · Lc 106 | 16.88:1 · Lc 101 |
| Secondary text in cards | muted-foreground on card | 6.89:1 · Lc 84 | 9.01:1 · Lc 62 |
| Menus and popovers | popover-foreground on popover | 19.67:1 · Lc 106 | 16.88:1 · Lc 101 |
| Primary buttons | primary-foreground on primary | 19.67:1 · Lc 108 | 18.05:1 · Lc 100 |
| Links and outline accents | primary on background | 19.67:1 · Lc 106 | 18.05:1 · Lc 101 |
| Secondary buttons | secondary-foreground on secondary | 17.75:1 · Lc 99 | 15.89:1 · Lc 100 |
| Text on muted panels | muted-foreground on muted | 6.21:1 · Lc 77 | 8.48:1 · Lc 61 |
| Hovered menu items | accent-foreground on accent | 17.89:1 · Lc 99 | 15.50:1 · Lc 100 |
| Error messages | destructive on background | 6.58:1 · Lc 81 | 9.28:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 19.01:1 · Lc 103 | 17.25:1 · Lc 101 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 19.67:1 · Lc 108 | 18.05:1 · Lc 100 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 17.75:1 · Lc 99 | 15.89:1 · Lc 100 |
| Focus ring | ring on background | 19.67:1 | 18.05: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/offset.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/archivoThe registry item: themes.dev/r/presets/offset.json. Free to use in any project.
:root {
--radius: 0rem;
--background: oklch(1 0 0);
--foreground: oklch(0.15 0.002 286.14);
--card: oklch(1 0 0);
--card-foreground: oklch(0.15 0.002 286.14);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.15 0.002 286.14);
--primary: oklch(0.15 0.002 286.14);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.965 0.004 0);
--secondary-foreground: oklch(0.15 0.002 286.14);
--muted: oklch(0.965 0.004 0);
--muted-foreground: oklch(0.468 0 0);
--accent: oklch(0.967 0.003 106.45);
--accent-foreground: oklch(0.15 0.002 286.14);
--destructive: oklch(0.5 0.182 29.51);
--border: oklch(0.915 0.004 106.48);
--input: oklch(0.633 0.004 106.52);
--ring: oklch(0.15 0.002 286.14);
--chart-1: oklch(0.81 0 0);
--chart-2: oklch(0.66 0 0);
--chart-3: oklch(0.56 0 0);
--chart-4: oklch(0.47 0 0);
--chart-5: oklch(0.39 0 0);
--sidebar: oklch(0.988 0 0);
--sidebar-foreground: oklch(0.15 0.002 286.14);
--sidebar-primary: oklch(0.15 0.002 286.14);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.965 0.004 0);
--sidebar-accent-foreground: oklch(0.15 0.002 286.14);
--sidebar-border: oklch(0.915 0.004 106.48);
--sidebar-ring: oklch(0.15 0.002 286.14);
}
.dark {
--background: oklch(0.15 0.002 286.14);
--foreground: oklch(0.97 0.003 106.45);
--card: oklch(0.192 0.002 286.21);
--card-foreground: oklch(0.97 0.003 106.45);
--popover: oklch(0.192 0.002 286.21);
--popover-foreground: oklch(0.97 0.003 106.45);
--primary: oklch(0.97 0.003 106.45);
--primary-foreground: oklch(0.15 0.002 286.14);
--secondary: oklch(0.22 0.006 286.14);
--secondary-foreground: oklch(0.97 0.003 106.45);
--muted: oklch(0.22 0.006 286.14);
--muted-foreground: oklch(0.774 0.003 106.46);
--accent: oklch(0.23 0.002 286.25);
--accent-foreground: oklch(0.97 0.003 106.45);
--destructive: oklch(0.778 0.13 29.69);
--border: oklch(0.269 0.002 286.28);
--input: oklch(0.538 0 0);
--ring: oklch(0.97 0.003 106.45);
--chart-1: oklch(0.82 0 0);
--chart-2: oklch(0.7 0 0);
--chart-3: oklch(0.6 0 0);
--chart-4: oklch(0.5 0 0);
--chart-5: oklch(0.42 0 0);
--sidebar: oklch(0.18 0.002 286.14);
--sidebar-foreground: oklch(0.97 0.003 106.45);
--sidebar-primary: oklch(0.97 0.003 106.45);
--sidebar-primary-foreground: oklch(0.15 0.002 286.14);
--sidebar-accent: oklch(0.22 0.006 286.14);
--sidebar-accent-foreground: oklch(0.97 0.003 106.45);
--sidebar-border: oklch(0.269 0.002 286.28);
--sidebar-ring: oklch(0.97 0.003 106.45);
}
@theme inline {
--font-sans: "Archivo Variable", "Archivo", ui-sans-serif, system-ui, sans-serif;
--font-heading: "Archivo Variable", "Archivo", ui-sans-serif, system-ui, sans-serif;
}
The whole site
Offset started as Offset, a website theme
Offset is a complete site for Agencies and studios: 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.
