get_colors()
  • 1 Minute to read

get_colors()


Article summary

Returns a List type string with all the leds colors name.

Reference

List of colors

The list is being updated all the time so we extremelly recommend to use this method to get the most updated list of colors

ColorHex
white#FFFFF
red_basic#00FF00
red_general#009600
blue basic#0000FF
blue_general#CD00DC
blue_pressed#5A00FF
green_basic#FF0000
green_general#FF000A
green_pressed#D23282
rainbowMulti-Color

Arguments

ArgumentsTypeDefault valueExplenation
groupstringNonename of the predefined led's group

Return

List: a list type string that containes all the avilable colors for the led's.

Exceptions

ExceptionCondition
RayaLedsWrongGroupInvalid group name (argument sent to group was not found on the list).

See the complete list of Raya Exceptions.

Example

Print the list of possible colors for the selected group.
Code:

print(self.leds.get_colors(group = 'sensors'))

Console output:

['white', 'red_basic', 'red_general', 'red_pressed', 'blue_basic', 'blue_general', 'blue_pressed', 'green_basic', 'green_general', 'green_pressed', 'rainbow', 'moving_rainbow']

Was this article helpful?

What's Next