pushbase.colors¶
Module constants¶
LIVE_COLORS_TO_MIDI_VALUESRGB_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¶
BLACKDARK_GREYGREYWHITEREDAMBERYELLOWLIMEGREENSPRINGTURQUOISECYANSKYOCEANBLUEORCHIDMAGENTAPINK
class Basic(object)¶
Bases: object
Attributes¶
HALFHALF_BLINK_SLOWHALF_BLINK_FASTFULLFULL_BLINK_SLOWFULL_BLINK_FASTOFFONTRANSPARENT
class BiLed(object)¶
Bases: object
Attributes¶
GREENGREEN_HALFGREEN_BLINK_SLOWGREEN_BLINK_FASTREDRED_HALFRED_BLINK_SLOWRED_BLINK_FASTYELLOWYELLOW_HALFYELLOW_BLINK_SLOWYELLOW_BLINK_FASTAMBERAMBER_HALFAMBER_BLINK_SLOWAMBER_BLINK_FASTOFFON