Theming
How Penates looks comes from four independent layers: the manager’s look, its tokens and skins, each app window’s theme, and the toolbar’s color.
1. Manager Look (Settings Tab)
Section titled “1. Manager Look (Settings Tab)”Saved in settings.toml under [appearance] and applied by setting three attributes on <html>:
data-theme, data-accent and data-skin. The manager passes the saved look in before the page loads
(ui/boot.js applies it), so the window never flashes the default theme first.
- Light or dark:
systemfollows the OS (prefers-color-scheme), or forcelight/dark. - Accent:
violet(default, from the logo),blue,green,orange,rose,slate. Each has a light and a dark value, chosen so text in the accent color and the label on an accent button both keep at least 4.5:1 contrast. - Look (skin):
default,nord,solarized,mono(high contrast, square corners).
2. Tokens and Skins (Plain CSS)
Section titled “2. Tokens and Skins (Plain CSS)”ui/tokens.cssis the single source of truth: fonts, radii, shadow, surfaces (--bg --card --line --chip --fg --muted), status colors, and the accent palette. Light is the default; dark applies for the OS dark setting ordata-theme="dark", anddata-theme="light"forces light. Colors, radii and shadows all come from here; looks come fromskins.css.ui/skins.csslayers named token sets over the base, each defining light and dark values. A skin selector works on any element, so the Settings preview cards show real skin colors.- Add a skin: copy a block in
skins.css, changedata-skin="<name>"and the colors, and add the name toSKINSinui/app.jsand incrates/penates-core/src/settings.rs. - Add an accent: add a
[data-accent="<name>"]line totokens.cssand the name toACCENTSinui/app.jsandsettings.rs.
3. Per-App Window Theme
Section titled “3. Per-App Window Theme”theme = "system" | "light" | "dark" in an app’s config (Edit → Window). It sets the native window theme and what the site reports through prefers-color-scheme.
Platform note: this works through Tauri’s window theme API, which is honored on Windows and macOS. On Linux, WebKitGTK takes light or dark from the desktop (KDE reports it through the settings portal), so the setting does not change what a site sees. This was tested: a probe page reported dark with the app set to light, with and without a GTK theme override.
4. Toolbar Color
Section titled “4. Toolbar Color”Settings → Appearance → Toolbar Color sets the default for every app with a toolbar: Match each site or
Penates colors. Each app can choose its own under Edit → Window: the default, the site’s, Penates’s, or a
custom color (a color picker, or any CSS color typed in: hex, rgb(), hsl(), a name, oklch(); it is saved
as #rrggbb).
Matching a site uses its theme-color (the one for light or dark mode, whichever applies), else the page’s
background, else Penates’s colors, and follows changes while the app is open. Icons and text turn light or dark
by contrast (WCAG), so the toolbar stays readable on any color.