Kilowatt, a shadcn/ui preset
Energy yellow on ink buttons with Source Sans 3; yellow leads in the dark. It comes from Kilowatt, one of our website themes.
Fonts: Source Sans 3 · radius 0.3125rem · light and dark · lowest text contrast 6.58:1
npx shadcn@latest add https://www.themes.dev/r/presets/kilowatt.jsonKilowatt 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#1a2133
- primary#141414
- primary-foreground#fffc98
- secondary#f6f2f3
- muted-foreground#4f5663
- accent#fefdd6
- border#e3e5e1
- destructive#b42318
- ring#141414
- chart-1#c1c1c1
- chart-2#929292
- chart-3#747474
- chart-4#5b5b5b
- chart-5#454545
Dark
- background#121212
- foreground#f5f5f0
- primary#fffc98
- primary-foreground#141414
- secondary#242122
- muted-foreground#b9b9b9
- accent#262626
- border#2b2b2b
- destructive#ff9693
- ring#fffc98
- 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 | 16.04:1 · Lc 103 | 17.15:1 · Lc 101 |
| Secondary text on the page | muted-foreground on background | 7.38:1 · Lc 86 | 9.53:1 · Lc 64 |
| Text in cards | card-foreground on card | 16.04:1 · Lc 103 | 16.14:1 · Lc 100 |
| Secondary text in cards | muted-foreground on card | 7.38:1 · Lc 86 | 8.97:1 · Lc 63 |
| Menus and popovers | popover-foreground on popover | 16.04:1 · Lc 103 | 16.14:1 · Lc 100 |
| Primary buttons | primary-foreground on primary | 17.22:1 · Lc 102 | 17.22:1 · Lc 100 |
| Links and outline accents | primary on background | 18.43:1 · Lc 105 | 17.51:1 · Lc 102 |
| Secondary buttons | secondary-foreground on secondary | 14.47:1 · Lc 96 | 14.58:1 · Lc 99 |
| Text on muted panels | muted-foreground on muted | 6.66:1 · Lc 79 | 8.10:1 · Lc 62 |
| Hovered menu items | accent-foreground on accent | 15.41:1 · Lc 100 | 14.48:1 · Lc 101 |
| Error messages | destructive on background | 6.58:1 · Lc 81 | 8.95:1 · Lc 61 |
| Sidebar | sidebar-foreground on sidebar | 15.50:1 · Lc 101 | 16.14:1 · Lc 100 |
| Sidebar active item | sidebar-primary-foreground on sidebar-primary | 17.22:1 · Lc 102 | 17.22:1 · Lc 100 |
| Sidebar hover | sidebar-accent-foreground on sidebar-accent | 14.47:1 · Lc 96 | 14.58:1 · Lc 99 |
| Focus ring | ring on background | 18.43:1 | 17.51: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/kilowatt.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/source-sans-3The registry item: themes.dev/r/presets/kilowatt.json. Free to use in any project.
:root {
--radius: 0.313rem;
--background: oklch(1 0 0);
--foreground: oklch(0.25 0.036 267.51);
--card: oklch(1 0 0);
--card-foreground: oklch(0.25 0.036 267.51);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.25 0.036 267.51);
--primary: oklch(0.191 0 0);
--primary-foreground: oklch(0.972 0.122 106.97);
--secondary: oklch(0.965 0.004 0);
--secondary-foreground: oklch(0.25 0.036 267.51);
--muted: oklch(0.965 0.004 0);
--muted-foreground: oklch(0.452 0.023 262.89);
--accent: oklch(0.984 0.05 105.56);
--accent-foreground: oklch(0.25 0.036 267.51);
--destructive: oklch(0.5 0.182 29.51);
--border: oklch(0.919 0.006 128.53);
--input: oklch(0.598 0.017 260.72);
--ring: oklch(0.191 0 0);
--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.25 0.036 267.51);
--sidebar-primary: oklch(0.191 0 0);
--sidebar-primary-foreground: oklch(0.972 0.122 106.97);
--sidebar-accent: oklch(0.965 0.004 0);
--sidebar-accent-foreground: oklch(0.25 0.036 267.51);
--sidebar-border: oklch(0.919 0.006 128.53);
--sidebar-ring: oklch(0.191 0 0);
}
.dark {
--background: oklch(0.182 0 0);
--foreground: oklch(0.969 0.007 106.52);
--card: oklch(0.212 0 0);
--card-foreground: oklch(0.969 0.007 106.52);
--popover: oklch(0.212 0 0);
--popover-foreground: oklch(0.969 0.007 106.52);
--primary: oklch(0.972 0.122 106.97);
--primary-foreground: oklch(0.191 0 0);
--secondary: oklch(0.252 0.004 0);
--secondary-foreground: oklch(0.969 0.007 106.52);
--muted: oklch(0.252 0.004 0);
--muted-foreground: oklch(0.785 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.782 0.127 22);
--border: oklch(0.29 0 0);
--input: oklch(0.34 0 0);
--ring: oklch(0.972 0.122 106.97);
--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.212 0 0);
--sidebar-foreground: oklch(0.969 0.007 106.52);
--sidebar-primary: oklch(0.972 0.122 106.97);
--sidebar-primary-foreground: oklch(0.191 0 0);
--sidebar-accent: oklch(0.252 0.004 0);
--sidebar-accent-foreground: oklch(0.969 0.007 106.52);
--sidebar-border: oklch(0.29 0 0);
--sidebar-ring: oklch(0.972 0.122 106.97);
}
@theme inline {
--font-sans: "Source Sans 3 Variable", "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
--font-heading: "Source Sans 3 Variable", "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
}
The whole site
Kilowatt started as Kilowatt, a website theme
Kilowatt is a complete site for Solar panel and heat pump installers: 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.
