set_color()
  • 1 Minute to read

set_color()


Article summary

This function sets a particular group to a color (see list of colors with get_colors).

Reference

Arguments

ArgumentsTypeExplanation
groupstringName of the predefined led's group.
colorstringName of the predefined led's color.

Return

None

Exceptions

  • RayaLedsWrongGroup
  • RayaLedsWrongColor

See the complete LEDs exceptions.

Usage example

Sets the 'head' group of leds to the color 'red' (see hex values in get_colors().
Code:

self.leds.set_color(group = 'head', color = 'red')

Was this article helpful?