get_colors()
- 1 Minute to read
get_colors()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
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
Color | Hex |
---|---|
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 |
rainbow | Multi-Color |
Arguments
Arguments | Type | Default value | Explenation |
---|---|---|---|
group | string | None | name of the predefined led's group |
Return
List: a list type string that containes all the avilable colors for the led's.
Exceptions
Exception | Condition |
---|---|
RayaLedsWrongGroup | Invalid 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?