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).
-
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.
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”
-
static
async_get_list
(connection: iterm2.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”
-
property
values
¶ Returns a list of color settings.
- Returns
The colors belonging to the preset.
-
static
-
class
Color
(r, g, b, a, color_space, key)¶ Derives from
Color
.Note this is is an inner class of ColorPreset.
-
property
key
¶ Describes which property this color affects.
-
property
-
class
ListPresetsException
¶ Something went wrong listing presets.
-
class
GetPresetException
¶ Something went wrong fetching a color preset.