Make a theme
Choose tokens, check contrast, and submit your theme.
Anyone can add a theme to Sevnly. A theme is tokens only: one small JSON file with colors, a font choice and a few style switches. No CSS, no JavaScript, no URLs, no images. That's why a theme can't break the layout, track anyone or load anything from outside, and why we can accept them from anyone.
At build time each theme becomes about 1 KB of CSS variables, loaded on demand. Every component reads those variables, so your theme works everywhere: web, desktop, iOS, Android, public calendar pages and print.
Where themes live
packages/themes/
├─ schema.ts Zod schema for theme files
├─ paper/
│ ├─ theme.json tokens
│ └─ preview.png generated by CI, don't edit
├─ kraft/ …
└─ community/
└─ <your-theme>/theme.jsonBuilt-in themes: Paper (default), Kraft, Blueprint, Graphite, Sakura, Matcha, Ocean, Lavender, Fjord, Terminal, Night shift and High contrast. Your theme goes in community/.
The theme file
{
"id": "blueprint",
"name": { "en": "Blueprint", "zh-TW": "藍圖" },
"author": { "name": "…", "github": "…" },
"license": "MIT", // themes are MIT so they can be reused anywhere
"modes": {
"light": {
"bg": "#1E4E8C", "surface": "#24589B", "text": "#F4F8FF", "muted": "#B9CBE6",
"rule": "#5B85C0", "accent": "#FFD166", "today": "#2E66B0", "focus": "#FFD166",
"danger": "#FF8A80", "task": ["#…", "… 16 colors in total"]
},
"dark": { "…": "…" }
},
"font": { "display": "inter-display", "body": "system", "mono": "jetbrains-mono" },
"radius": "md", // none | sm | md | lg
"ruleStyle": "solid", // solid | dashed | dotted (day/list separators; `rule` above is their color)
"texture": "grid" // none | paper | grid | dots | lines (built-in CSS patterns only)
}Token reference
Identity
| Token | What it is |
|---|---|
id | The theme's identifier, used in the URL (/?theme=my-theme). |
name | Display name, keyed by locale (en, zh-TW, …). Translations beyond English are optional. |
author.name | Your name, shown with the theme in the in-app gallery and on the Docs → Themes page. |
author.github | Your GitHub handle, for the credit link. |
license | Always "MIT". See Licensing. |
Colors (modes.light and modes.dark)
Every theme has a light and a dark mode, and both need the full set of colors. Users pick light, dark or system per theme.
| Token | Used for |
|---|---|
bg | The page background: the "paper" behind the week. |
surface | Raised areas on top of the page: task sheet, menus, popovers, the settings modal, cards. |
text | Main text: task titles, headings. |
muted | Secondary text: dates, hints, placeholders, "carried over from Tue". |
rule | Line color: the faint notebook lines in day columns and lists, and the day/list separators (their style is ruleStyle). |
accent | The one accent color: the Today header and its underline, primary buttons, links, selection. Users can override it with their own (contrast-checked). |
today | Background highlight of today's column. |
focus | Keyboard focus ring. Must stand out on both bg and surface. |
danger | Destructive actions and errors: delete buttons, warnings. |
task | The task color palette: exactly 16 colors, in slot order. Tasks store the slot (p:3), not the hex value, so a task colored with slot 3 picks up slot 3 of whatever theme is active. Keep slots roughly matching in meaning across modes (slot 0 red-ish in light should still be red-ish in dark). |
Style switches (shared by both modes)
| Token | Values | What it does |
|---|---|---|
font.display | a font id from the built-in list (e.g. inter-display) | Big headings: the month title, day headers. |
font.body | a font id, or system | Everything else. system uses the platform's UI font. |
font.mono | a font id (e.g. jetbrains-mono) | Code and other monospace text. |
radius | none · sm · md · lg | Corner rounding for tasks, buttons, sheets and cards. |
ruleStyle | solid · dashed · dotted | Line style of day and list separators. Their color is modes.*.rule. |
texture | none · paper · grid · dots · lines | Background pattern on the page. These are built-in CSS patterns, not images. |
Fonts and textures
- Fonts must come from the built-in list of open-licensed, self-hosted fonts. The schema in
packages/themes/schema.tsonly accepts ids from that list. Remote font URLs aren't allowed. - Textures are the fixed set above:
none,paper,grid,dots,lines. You can't supply your own image or pattern.
Workflow
1. Scaffold
pnpm theme:new my-themeThis creates packages/themes/community/my-theme/theme.json, copied from Paper. Change the id, name and author, then start editing colors.
2. Preview while you work
pnpm devThen either:
- open
/?theme=my-themeto use the real planner with your theme, or - open the theme playground at
/dev/themes. It shows every component, both modes, all 16 task colors, a print preview, and your theme side by side with Paper.
3. Check
pnpm theme:check my-themeThis runs exactly what CI runs:
| Check | Passes when |
|---|---|
| Schema | theme.json matches the Zod schema (all tokens present, valid values, known font ids). |
| Contrast | Every text/background pair meets WCAG AA: at least 4.5:1 for text and 3:1 for UI elements (rules, focus ring, borders). The High contrast theme must meet AAA. |
| Task colors | All 16 task colors are distinguishable from each other and from the background, also under common color-blindness simulations. |
| Screenshots | Playwright captures week view, month view, task sheet, settings and print, in light and dark. These generate preview.png. |
Fix whatever fails and run it again. Don't edit preview.png; CI generates it.
Contrast tips
- Check
textandmutedagainst bothbgandsurface, and againsttoday(text sits on today's column too). mutedis the one that usually fails. Push it a little closer totext.- Dark mode is not "invert light mode". Dim the background, then lighten the task colors until they pass again.
focusneeds 3:1 against everything it can sit on.
Opening the PR
- Open a PR with the
themelabel. - Fill in the PR template: the theme name, translations of the name (optional), and a confirmation that the colors are your original work.
- Sign the CLA if it's your first PR (CLA Assistant will ask, once).
- A maintainer reviews it like code. They may tweak tokens so it passes the checks.
- Once merged, your theme shows up in the in-app gallery (Settings → Appearance) with your name, and on the Docs → Themes gallery page.
Site admins can enable or disable each theme and pick their site's default, so a self-hosted instance may not show every theme.
Licensing
Themes are MIT, not AGPL like most of Sevnly. packages/themes has its own LICENSE. That way a theme can be reused anywhere, including outside Sevnly. By submitting a theme you agree to publish it under MIT, which is why every theme.json says "license": "MIT".
Questions? Email [email protected].