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: Connection, name: str) None | 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.
See also
Example “Per-Host Colors”
Example “Get Selected Color Preset”
Example “Change Color Presets On Theme Change”
Example “Change Color Preset by Time of Day”
- async static async_get_list(connection: Connection) List[str]¶
Fetches a list of color presets.
- Parameters:
connection (
Connection) – AnConnection.- Returns:
Names of the color presets.
See also
Example “Get Selected Color Preset”
Example “Random Color Preset”
- class Color(r, g, b, a, color_space, key)¶
Derives from
Color.Note this is is an inner class of ColorPreset.
- class ListPresetsException¶
Something went wrong listing presets.
- class GetPresetException¶
Something went wrong fetching a color preset.
