-
Notifications
You must be signed in to change notification settings - Fork 0
Color and Temperature
Logan Savage edited this page May 27, 2026
·
4 revisions
The Color() action sets the color of the devices selected in the command by a 24-bit color value. While this takes in a single int value for representing the color, the veego.RGB(uint8,uint8,uint8) helper can be used to generate this value.
The Temperature() action behaves similarly, using the veego.K helper to generate a Kelvin color temperature. Note that unlike the Color() action, this helper should always be used, since it keeps the value passed in within the temperature bounds for the lights.
Set the color of every light device to red
err = controller.Devices().
TypeIs(veego.DeviceLight).
Color(veego.RGB(255, 0, 0)). // 0xFF0000 also works here
Exec()
if err != nil {
log.Fatal(err)
}Set the temperature of every light device to 3000K
err = controller.Devices().
TypeIs(veego.DeviceLight).
Temperature(veego.K(3000)).
Exec()
if err != nil {
log.Fatal(err)
}