Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

light

Zero Engine light 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. The code-highlighter palette is tuned for light backgrounds (more contrast against #f5f5f5 than the dark-theme palette).

Exports

  • name: string — "light". 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.light")
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.* token values are tuned for light backgrounds and produce different contrast than the dark-theme palette.