Color Presets

Provides access to color presets.

class ColorPreset(proto)

A color preset is a named collection of colors attached to terminal attributes (e.g., default background color).

async static async_get(connection: iterm2.connection.Connection, name: str)Union[None, iterm2.colorpresets.ColorPreset]

Fetches a color preset with the given name.

  • connection (Connection) – The connection to iTerm2.

  • name (str) – The name of the preset to fetch.


Either a new preset or None.

async static async_get_list(connection: iterm2.connection.Connection)List[str]

Fetches a list of color presets.


connection (Connection) – An Connection.


Names of the color presets.

See also

property values: List[iterm2.colorpresets.ColorPreset.Color]

Returns a list of color settings.


The colors belonging to the preset.

class Color(r, g, b, a, color_space, key)

Derives from Color.

Note this is is an inner class of ColorPreset.

property key: str

Describes which property this color affects.

class ListPresetsException

Something went wrong listing presets.

class GetPresetException

Something went wrong fetching a color preset.

Indices and tables