Light effects are a number of customizable animations that can be displayed to a LightRegion. Light effects are activated in response to different Actions.
In addition, light effects can be stacked on top of each other. When you have regions that overlap each other (e.g. using the same LEDs for brakes and indicators), you can specify which effects have priority over others using the optional layer parameter for each effect.
Colors must be provided as one of the following:
HTML hex string (#RRGGBB)
random - Random color
rainbow - Rainbow color (cycles each render step)
Setting a duration or speed of 0 will stop the effect from animating
Transparent
Skips rendering this layer (useful when you want to preserve colors from another layer)
1
0,<layer>
Copied!
Parameter
Type
Description
layer
uint8_t
(Optional) Layer
Off
Sets all lights in the region to off
1
1,<layer>
Copied!
Parameter
Type
Description
layer
uint8_t
(Optional) Layer
Color
Sets all LEDs in a region to the provided color
1
2,<color>,<layer>
Copied!
Parameter
Type
Description
color
string
Background color
layer
uint8_t
(Optional) Layer
Blink
Blinks the entire strip between two colors at a set duration
1
3,<first>,<second>,<duration>,<layer>
Copied!
Parameter
Type
Description
first
string
First blink color
second
string
Second blink color
duration
unsigned long long
Time for each color (ms)
layer
uint8_t
(Optional) Layer
Alternate
Repeats two pixel colors along a region. Colors swap at a set speed
1
4,<first>,<second>,<duration>,<layer>
Copied!
Parameter
Type
Description
first
string
First
second
string
Second blink color
duration
unsigned long long
Time between alternations (ms)
layer
uint8_t
(Optional) Layer
ColorWipe
Progressively wipes the Region from one color to the next over the duration