sensors.ColorSensor

class sensors.ColorSensor(port: Optional[int])

Sensor for measuring colors from a camera.

color() → color.Color

The color in front of the sensor.

name() → str

Returns the user editable name of the controllable as found in the properties tab of the game.

from ports import PortReference

print(PortReference(0).name())
stream() → Stream[Color]

Creates an stream of all the colors that the sensor has recorded.