Shared classes for representing color and related concepts.

class Color(r: int = 0, g: int = 0, b: int = 0, a: int = 255, color_space: iterm2.color.ColorSpace = <ColorSpace.SRGB: 'sRGB'>)

Describes a color.

  • r – Red, in 0-255

  • g – Green, in 0-255

  • b – Blue, in 0-255

  • a – Alpha, in 0-255

  • color_space – The color space. Only sRGB is supported currently.

property alpha: int

The color’s alpha component.

property blue: int

The color’s blue component.

property color_space: iterm2.color.ColorSpace

The color’s color space.

property green: int

The color’s green component.

property red: int

The color’s red component.

class ColorSpace(value)

Describes the color space of a Color.

CALIBRATED = 'Calibrated'

Device color space


SRGB color space

Indices and tables