Skip to main content
function ConfigTheme.define
def ConfigTheme.define(
name: str,
theme: typing.Any,
/
) -> None
Define a theme named name, as a theme file is written ({"extends": "aspect-dark", "roles": {...}}). Name two <family>-dark and <family>-light to make a family select can name. A name the user’s config.json or theme files also define is theirs. function ConfigTheme.roles
def ConfigTheme.roles(
roles: typing.Any,
/,
*,
appearance: None | str = None
) -> None
Override roles of whichever theme is selected: roles maps a role name to a value as a theme file writes it ("#FF5555", 196, {"fg": "@accent", "bold": True}, {"rgb": …, "256": …, "16": …}). With appearance (light or dark), only when the selected theme has that appearance. The user’s own overrides apply on top. function ConfigTheme.select
def ConfigTheme.select(
*,
name: None | str = None,
appearance: None | str = None,
bazel: None | str = None
) -> None
Pick the theme: name, a family (aspect, high-contrast, colorblind, ansi, mono, or one defined with define or a theme file) or a variant (aspect-light); appearance, auto, light or dark; bazel, shared (Bazel’s labels take the theme’s colours) or tool (Bazel’s own). Each is optional, and the user’s ~/.aspect/config.json overrides each.