Skip to content

pushbase.colors

Module constants

  • LIVE_COLORS_TO_MIDI_VALUES
  • RGB_COLOR_TABLE = ((0, 0), (1, 1973790), (2, 8355711), (3, 16777215), (4, 16731212), (5, 16711680), (6, 5832704), (7, 1638400), (8, 16760172), (9, 16733184), (10, 5840128), (11, …

Classes

class PushColor(Color)

Bases: Color

Attributes

  • needs_rgb_interface = False

can_draw_on_interface(self, interface)

draw(self, interface)

class RgbColor(PushColor)

Bases: PushColor

Attributes

  • needs_rgb_interface = True
  • _rgb_value = (0, 0, 0)

__init__(self, midi_value, rgb_value, *a, **k)

shade(self, shade_level)

highlight(self)

__iter__(self)

__getitem__(self, index_or_slice)

class FallbackColor(PushColor)

Bases: PushColor

__init__(self, default_color, fallback_color, *a, **k)

draw(self, interface)

class AnimatedColor(PushColor)

Bases: PushColor

midi_value(self)

__init__(self, color1, color2, channel2, *a, **k)

can_draw_on_interface(self, interface)

draw(self, interface)

convert_to_midi_value(self)

class Pulse(AnimatedColor)

Bases: AnimatedColor

__init__(self, color1, color2, speed, *a, **k)

class Blink(AnimatedColor)

Bases: AnimatedColor

__init__(self, color1, color2, speed, *a, **k)

class TransparentColor(object)

Bases: object

draw(self, interface)

class Rgb(object)

Bases: object

Attributes

  • BLACK
  • DARK_GREY
  • GREY
  • WHITE
  • RED
  • AMBER
  • YELLOW
  • LIME
  • GREEN
  • SPRING
  • TURQUOISE
  • CYAN
  • SKY
  • OCEAN
  • BLUE
  • ORCHID
  • MAGENTA
  • PINK

class Basic(object)

Bases: object

Attributes

  • HALF
  • HALF_BLINK_SLOW
  • HALF_BLINK_FAST
  • FULL
  • FULL_BLINK_SLOW
  • FULL_BLINK_FAST
  • OFF
  • ON
  • TRANSPARENT

class BiLed(object)

Bases: object

Attributes

  • GREEN
  • GREEN_HALF
  • GREEN_BLINK_SLOW
  • GREEN_BLINK_FAST
  • RED
  • RED_HALF
  • RED_BLINK_SLOW
  • RED_BLINK_FAST
  • YELLOW
  • YELLOW_HALF
  • YELLOW_BLINK_SLOW
  • YELLOW_BLINK_FAST
  • AMBER
  • AMBER_HALF
  • AMBER_BLINK_SLOW
  • AMBER_BLINK_FAST
  • OFF
  • ON