Counterfoil, a shadcn/ui preset
Hot magenta with Arimo, from a ticketing theme. It comes from Counterfoil, one of our website themes.
Fonts: Arimo · radius 0.75rem · light and dark · lowest text contrast 4.53:1
npx shadcn@latest add https://www.themes.dev/r/presets/counterfoil.jsonCounterfoil 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#f3f3f1
- foreground#1c1c1c
- primary#cf00a5
- primary-foreground#ffffff
- secondary#e8e8e3
- muted-foreground#545452
- accent#ffe0f4
- border#dcdcd8
- destructive#b42318
- ring#1c1c1c
- chart-1#ff8fe5
- chart-2#f228c4
- chart-3#c701a0
- chart-4#a10080
- chart-5#7f0064
Dark
- background#141414
- foreground#ededeb
- primary#ff8be4
- primary-foreground#1c1c1c
- secondary#262324
- muted-foreground#b7b7b3
- accent#381a32
- border#313131
- destructive#ff9788
- ring#ededeb
- chart-1#ff95e6
- chart-2#ff3cd1
- chart-3#d521ac
- chart-4#ac0089
- chart-5#8a006d
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.42:1 · Lc 97 | 15.75:1 · Lc 95 |
| Secondary text on the page | muted-foreground on background | 6.87:1 · Lc 79 | 9.18:1 · Lc 63 |
| Text in cards | card-foreground on card | 17.06:1 · Lc 104 | 14.24:1 · Lc 94 |
| Secondary text in cards | muted-foreground on card | 7.60:1 · Lc 86 | 8.31:1 · Lc 62 |
| Menus and popovers | popover-foreground on popover | 17.06:1 · Lc 104 | 14.24:1 · Lc 94 |
| Primary buttons | primary-foreground on primary | 5.01:1 · Lc 77 | 8.19:1 · Lc 62 |
| Links and outline accents | primary on background | 4.53:1 · Lc 65 | 8.85:1 · Lc 61 |
| Secondary buttons | secondary-foreground on secondary | 13.90:1 · Lc 90 | 13.25:1 · Lc 93 |
| Text on muted panels | muted-foreground on muted | 6.19:1 · Lc 73 | 7.73:1 · Lc 61 |
| Hovered menu items | accent-foreground on accent | 7.46:1 · Lc 75 | 9.44:1 · Lc 72 |
| Error messages | destructive on background | 5.95:1 · Lc 74 | 8.79:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 14.88:1 · Lc 95 | 14.75:1 · Lc 95 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 5.01:1 · Lc 77 | 8.19:1 · Lc 62 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 13.90:1 · Lc 90 | 13.25:1 · Lc 93 |
| Focus ring | ring on background | 15.42:1 | 15.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/counterfoil.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/arimoThe registry item: themes.dev/r/presets/counterfoil.json. Free to use in any project.
:root {
--radius: 0.75rem;
--background: oklch(0.965 0.003 106.45);
--foreground: oklch(0.226 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.226 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.226 0 0);
--primary: oklch(0.576 0.25 340.38);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.93 0.007 106.45);
--secondary-foreground: oklch(0.226 0 0);
--muted: oklch(0.93 0.007 106.45);
--muted-foreground: oklch(0.445 0.003 106.53);
--accent: oklch(0.938 0.043 338.98);
--accent-foreground: oklch(0.428 0.186 339.54);
--destructive: oklch(0.5 0.182 29.51);
--border: oklch(0.893 0.005 106.51);
--input: oklch(0.571 0.006 106.59);
--ring: oklch(0.226 0 0);
--chart-1: oklch(0.796 0.169 336.43);
--chart-2: oklch(0.66 0.267 340.01);
--chart-3: oklch(0.56 0.243 340.02);
--chart-4: oklch(0.479 0.208 340.37);
--chart-5: oklch(0.401 0.174 340.55);
--sidebar: oklch(0.953 0.003 106.45);
--sidebar-foreground: oklch(0.226 0 0);
--sidebar-primary: oklch(0.576 0.25 340.38);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.93 0.007 106.45);
--sidebar-accent-foreground: oklch(0.226 0 0);
--sidebar-border: oklch(0.893 0.005 106.51);
--sidebar-ring: oklch(0.226 0 0);
}
.dark {
--background: oklch(0.191 0 0);
--foreground: oklch(0.946 0.003 106.45);
--card: oklch(0.235 0 0);
--card-foreground: oklch(0.946 0.003 106.45);
--popover: oklch(0.235 0 0);
--popover-foreground: oklch(0.946 0.003 106.45);
--primary: oklch(0.791 0.174 336.52);
--primary-foreground: oklch(0.226 0 0);
--secondary: oklch(0.261 0.004 0);
--secondary-foreground: oklch(0.946 0.003 106.45);
--muted: oklch(0.261 0.004 0);
--muted-foreground: oklch(0.779 0.006 106.54);
--accent: oklch(0.271 0.06 335.99);
--accent-foreground: oklch(0.855 0.112 337.1);
--destructive: oklch(0.781 0.128 29.18);
--border: oklch(0.313 0 0);
--input: oklch(0.592 0.006 106.58);
--ring: oklch(0.946 0.003 106.45);
--chart-1: oklch(0.806 0.16 336.22);
--chart-2: oklch(0.698 0.266 339.72);
--chart-3: oklch(0.6 0.244 340.01);
--chart-4: oklch(0.502 0.218 340.08);
--chart-5: oklch(0.428 0.186 340.38);
--sidebar: oklch(0.221 0 0);
--sidebar-foreground: oklch(0.946 0.003 106.45);
--sidebar-primary: oklch(0.791 0.174 336.52);
--sidebar-primary-foreground: oklch(0.226 0 0);
--sidebar-accent: oklch(0.261 0.004 0);
--sidebar-accent-foreground: oklch(0.946 0.003 106.45);
--sidebar-border: oklch(0.313 0 0);
--sidebar-ring: oklch(0.946 0.003 106.45);
}
@theme inline {
--font-sans: "Arimo Variable", "Arimo", ui-sans-serif, system-ui, sans-serif;
--font-heading: "Arimo Variable", "Arimo", ui-sans-serif, system-ui, sans-serif;
}
The whole site
Counterfoil started as Counterfoil, a website theme
Counterfoil is a complete site for Charities and food bank networks: 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.
