Hub LED

hub.led is a lpf2.devices.hub_led. Two ways to set the colour:

import hub
from lpf2 import color

hub.led.setColorIdx(color.RED)     # palette index
hub.led.setColor(0, 128, 255)      # explicit RGB (0..255 each)

Palette indices come from lpf2.color (BLACK, RED, GREEN, BLUE, YELLOW, PURPLE, CYAN, WHITE and the darker/lighter variants).

For fine-grained control set the RGB directly — setColor accepts any 8-bit triple.

Reference: lpf2.devices.hub_led.