> ## Documentation Index
> Fetch the complete documentation index at: https://aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# ConfigTheme

`function` **ConfigTheme.define**

<pre language="python">
  `def ConfigTheme.define(
  name: str,
  theme: typing.Any,
  /
  ) -> None`
</pre>

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**

<pre language="python">
  `def ConfigTheme.roles(
  roles: typing.Any,
  /,
  *,
  appearance: None | str = None
  ) -> None`
</pre>

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**

<pre language="python">
  `def ConfigTheme.select(
  *,
  name: None | str = None,
  appearance: None | str = None,
  bazel: None | str = None
  ) -> None`
</pre>

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.