function Theme.bg
Only
role’s background, as an escape ("\x1b[48;5;24m"), as fg is for the foreground: a selection, a hovered tab, a search match.
function Theme.depth
The colour depth
stream is drawn at: 24 (24-bit), 256 or 16, and 0 when it takes no colour.
function Theme.fg
Only
role’s foreground, as an escape ("\x1b[38;5;203m"); "" when it has none or stream takes no colour. For a surface that combines one role’s text colour with another’s background.
function Theme.info
What the run’s theme is:
name (the variant, aspect-dark), family (aspect, or None), appearance (dark, light or any), background (dark or light when the terminal’s is known, else None), follows_terminal (whether the background is unknown, so its status roles take the terminal’s own colours), bazel (shared or tool), hyperlinks (whether the terminal opens OSC 8 links), syntax_theme (a syntect theme name, or None) and roles (every role name).
function Theme.paint
text in role, then a reset; text alone when stream takes no colour or the role has no styling. default as for sgr.
function Theme.params
role’s SGR parameters ("1;38;5;203"), whatever any stream takes: for composing a sequence of one’s own. "" for no styling.
function Theme.sgr
The escape that opens
role ("\x1b[1;38;5;203m"), or "" when stream takes no colour or the role has no styling. default is a role value ("@highlight") for a role of a plugin’s own that the theme may not define. A role the theme does not have, with no default, fails.
function Theme.testonly_pin
Pin the run’s theme to the built-in
name (a family takes its appearance variant) at depth (24, 256 or 16), its background known: for a test that asserts the escapes a theme writes, whatever the environment it runs in. Only a test may call it: code in a *_test.axl file, or the runtime’s own tests; anywhere else it fails.
property Theme.reset
The SGR reset,
"\x1b[0m".
