Color

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.

Parameters
  • 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

The color’s alpha component.

property blue

The color’s blue component.

property color_space

The color’s color space.

property green

The color’s green component.

property red

The color’s red component.

class ColorSpace

Describes the color space of a Color.

CALIBRATED = 'Calibrated'

Device color space

SRGB = 'sRGB'

SRGB color space


Indices and tables