Source code for lpf2.color

"""Named colors for lights and color sensors.

Use them like ``hub.led.setColorIdx(color.RED)`` after
``from lpf2 import color``, or compare what a color sensor sees:
``if sensor.getColorIdx() == color.BLUE: ...``
"""

[docs] BLACK: int = 0
"""Black / off."""
[docs] PINK: int = 1
"""Pink."""
[docs] PURPLE: int = 2
"""Purple."""
[docs] BLUE: int = 3
"""Blue."""
[docs] LIGHTBLUE: int = 4
"""Light blue."""
[docs] CYAN: int = 5
"""Cyan."""
[docs] GREEN: int = 6
"""Green."""
[docs] YELLOW: int = 7
"""Yellow."""
[docs] ORANGE: int = 8
"""Orange."""
[docs] RED: int = 9
"""Red."""
[docs] WHITE: int = 10
"""White."""
[docs] NUM_COLORS: int = 11
"""How many colors there are (BLACK to WHITE)."""
[docs] NONE: int = 255
"""Sentinel: no colour / unknown."""