The color sensor is programmed to detect three colors (RGB). Based on the color, the car moves in different paths.