Skip to Content
Sevnly Docs

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.json

Built-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

TokenWhat it is
idThe theme's identifier, used in the URL (/?theme=my-theme).
nameDisplay name, keyed by locale (en, zh-TW, …). Translations beyond English are optional.
author.nameYour name, shown with the theme in the in-app gallery and on the Docs → Themes page.
author.githubYour GitHub handle, for the credit link.
licenseAlways "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.

TokenUsed for
bgThe page background: the "paper" behind the week.
surfaceRaised areas on top of the page: task sheet, menus, popovers, the settings modal, cards.
textMain text: task titles, headings.
mutedSecondary text: dates, hints, placeholders, "carried over from Tue".
ruleLine color: the faint notebook lines in day columns and lists, and the day/list separators (their style is ruleStyle).
accentThe one accent color: the Today header and its underline, primary buttons, links, selection. Users can override it with their own (contrast-checked).
todayBackground highlight of today's column.
focusKeyboard focus ring. Must stand out on both bg and surface.
dangerDestructive actions and errors: delete buttons, warnings.
taskThe 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)

TokenValuesWhat it does
font.displaya font id from the built-in list (e.g. inter-display)Big headings: the month title, day headers.
font.bodya font id, or systemEverything else. system uses the platform's UI font.
font.monoa font id (e.g. jetbrains-mono)Code and other monospace text.
radiusnone · sm · md · lgCorner rounding for tasks, buttons, sheets and cards.
ruleStylesolid · dashed · dottedLine style of day and list separators. Their color is modes.*.rule.
texturenone · paper · grid · dots · linesBackground 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.ts only 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-theme

This 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 dev

Then either:

  • open /?theme=my-theme to 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-theme

This runs exactly what CI runs:

CheckPasses when
Schematheme.json matches the Zod schema (all tokens present, valid values, known font ids).
ContrastEvery 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 colorsAll 16 task colors are distinguishable from each other and from the background, also under common color-blindness simulations.
ScreenshotsPlaywright 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 text and muted against both bg and surface, and against today (text sits on today's column too).
  • muted is the one that usually fails. Push it a little closer to text.
  • Dark mode is not "invert light mode". Dim the background, then lighten the task colors until they pass again.
  • focus needs 3:1 against everything it can sit on.

Opening the PR

  1. Open a PR with the theme label.
  2. Fill in the PR template: the theme name, translations of the name (optional), and a confirmation that the colors are your original work.
  3. Sign the CLA if it's your first PR (CLA Assistant will ask, once).
  4. A maintainer reviews it like code. They may tweak tokens so it passes the checks.
  5. 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].

On this page