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.

Parameters
  • connection (Connection) – The connection to iTerm2.

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

Returns

Either a new preset or None.

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

Fetches a list of color presets.

Parameters

connection (Connection) – An Connection.

Returns

Names of the color presets.

See also

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

Returns a list of color settings.

Returns

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