Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit95280a384c

README.md

dark

Zero Engine dark theme. Data-only module — returns a theme table with name, tokens (palette), and styles (widget rule blocks). Registered into the cascade resolver via Z.theme.register. Controls all visual appearance — colors, spacing, rounding, sizing — so nothing is hardcoded in Rust.

$tokenName references inside styles resolve against the tokens map before flat values are pushed to the engine. Includes a dedicated code-highlighter palette (code.* tokens) tuned for dark backgrounds and an MCP panel palette (mcp-* tokens) for the floating agent tool-call feed.

Exports

  • name: string — "dark". Used as the theme key when registering.
  • tokens: { [string]: string } — flat map of named tokens (colors, spacings, radii).
  • styles: { [string]: { [string]: any } } — widget style blocks, indexed by widget or widget.variant.

Usage

local theme = require("@builtin::themes.dark")
Z.theme.register(theme)

Notes

  • Pure data. Hot-reloading the module just re-registers the table next time Z.theme.register runs.
  • Code-highlighter code.* tokens map 1:1 to the highlighter modules; switching themes re-colors source code automatically.
  • MCP panel tokens (mcp-*) cover the floating agent tool-call feed — status colors, code-block backgrounds, hover/row tints.