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: ...

Attributes

BLACK

Black / off.

BLUE

Blue.

CYAN

Cyan.

GREEN

Green.

LIGHTBLUE

Light blue.

NONE

no colour / unknown.

NUM_COLORS

How many colors there are (BLACK to WHITE).

ORANGE

Orange.

PINK

Pink.

PURPLE

Purple.

RED

Red.

WHITE

White.

YELLOW

Yellow.

Module Contents

lpf2.color.BLACK: int = 0[source]

Black / off.

lpf2.color.BLUE: int = 3[source]

Blue.

lpf2.color.CYAN: int = 5[source]

Cyan.

lpf2.color.GREEN: int = 6[source]

Green.

lpf2.color.LIGHTBLUE: int = 4[source]

Light blue.

lpf2.color.NONE: int = 255[source]

no colour / unknown.

Type:

Sentinel

lpf2.color.NUM_COLORS: int = 11[source]

How many colors there are (BLACK to WHITE).

lpf2.color.ORANGE: int = 8[source]

Orange.

lpf2.color.PINK: int = 1[source]

Pink.

lpf2.color.PURPLE: int = 2[source]

Purple.

lpf2.color.RED: int = 9[source]

Red.

lpf2.color.WHITE: int = 10[source]

White.

lpf2.color.YELLOW: int = 7[source]

Yellow.