Themes

A theme is a folder under configs/themes/<id>/ with a theme.json manifest and optional sanitized SCSS for advanced styling.

Shipped theme ids

  • default: official baseline. The theme every production server should ship with.
  • minimal-serious-rp: community-editable example theme.
minimal-serious-rp is a reference, not a production theme

It ships as a copy-paste starting point so you can see what a custom theme looks like end to end. Do not run it as your live theme. Fork it into your own folder, change the id, change the brand, and ship that instead.

Theme modes

ModePurpose
tokensSafe colors, text contrast, panel radius, and branding toggles.
advancedTokens plus optional sanitized theme.scss and hud.scss.

Manifest fields

The theme id is the folder name selected by configs/theme.json -> activeTheme. The current manifest does not use an id, name, or description field.

  • version
  • _comment
  • enabled
  • mode
  • colors.accent
  • colors.accentSoft
  • colors.panel
  • colors.panelStrong
  • colors.surface
  • colors.textPrimary
  • colors.textSecondary
  • colors.textMeta
  • colors.success
  • colors.warning
  • colors.danger
  • layout.panelRadius
  • branding.showCommunityServerNameInEscapeMenu
  • customStyles.enabled
  • customStyles.file
  • customStyles.maxBytes
  • hudStyles.enabled
  • hudStyles.file
  • hudStyles.maxBytes

Advanced stylesheet rules

Advanced stylesheets are data, not code. The sanitizer blocks unsafe content. Blocked or restricted patterns include:

  • Razor.
  • C#.
  • JavaScript.
  • Remote URLs.
  • Imports.
  • Protected official warning selectors.
  • Full-screen root selectors such as root, ScreenPanel, body, html, and *.

HUD styles are applied only to curated HUD panels. General theme styles should not try to restyle every UI screen.

Safe token variables

Exposed to SCSS:

  • $lrp-accent
  • $lrp-accent-soft
  • $lrp-panel
  • $lrp-panel-strong
  • $lrp-surface
  • $lrp-text-primary
  • $lrp-text-secondary
  • $lrp-text-meta
  • $lrp-success
  • $lrp-warning
  • $lrp-danger
  • $lrp-radius

Create a custom theme

  1. Copy the Data folder configs/themes/default/ to a new folder.
  2. Name the folder with the final theme id, for example configs/themes/my-theme/.
  3. Edit the copied theme.json.
  4. Change token colors under colors first.
  5. Adjust layout.panelRadius and branding.showCommunityServerNameInEscapeMenu if needed.
  6. Keep "mode": "tokens" until the token version is stable.
  7. Set configs/theme.json"activeTheme": "my-theme".
  8. Run litherarp.theme_reload.
  9. Test HUD, roleplay menu, admin menu, phone, emergency UI, notices, and shops.
  10. If needed, enable "mode": "advanced" and add sanitized styles.
URL-safe theme ids

Keep theme ids lowercase and URL-safe. Use letters, numbers, hyphens, and underscores.

Theme commands

CommandPurpose
litherarp.theme_reloadReload theme config and active theme files.
litherarp.theme_resetRestore theme selector, shipped theme folders, configs/theme.scss, and configs/hud.scss.
litherarp.theme_demo_minimal_serious_rpInstall the Minimal Serious RP example theme folder.