Light Effects API
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
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
1
5,<first>,<second>,<duration>,<layer>
Copied!
Parameter
Type
Description
first
string
First blink color
second
string
Second blink color
duration
unsigned long long
Time between wipes (ms)
layer
uint8_t
(Optional) Layer

Breathe

iDevice standby style breathing animation (fixed speed)
1
6,<first>,<second>,<layer>
Copied!
Parameter
Type
Description
first
string
First breathe color
second
string
Second breathe color
layer
uint8_t
(Optional) Layer

Fade

Fade between two colors cyclically
1
7,<first>,<second>,<duration>,<layer>
Copied!
Parameter
Type
Description
first
string
First blink color
second
string
Second blink color
duration
unsigned long long
Fade duration (ms)
layer
uint8_t
(Optional) Layer

Scan

Moves a single pixel back and forth across a lighting region
1
8,<background>,<scanner>,<duration>,<layer>
Copied!
Parameter
Type
Description
background
string
Background color
scanner
string
Scan pixel color
duration
unsigned long long
Time between colors (ms)
layer
uint8_t
(Optional) Layer

Rainbow

Cycles the entire region through a rainbow spectrum of colors at a set speed
1
9,<speed>,<layer>
Copied!
Parameter
Type
Description
speed
unsigned long long
Color change time (ms)
layer
uint8_t
(Optional) Layer

Rainbow Cycle

Sets the region to the rainbow spectrum and moves the colors along the region at a set speed
1
10,<speed>,<layer>
Copied!
Parameter
Type
Description
speed
unsigned long long
Cycle speed (ms)
layer
uint8_t
(Optional) Layer

Color Chase

Three color marquee chase lights (inspired by the Adafruit Neopixel library)
1
11,<first>,<second>,<third>,<speed>,<layer>
Copied!
Parameter
Type
Description
first
string
First chase color
second
string
Second chase color
third
string
Third chase color
speed
unsigned long long
Update speed (ms)
layer
uint8_t
(Optional) Layer

Theater Chase

Theater marquee style chase lights (inspired by the Adafruit Neopixel library)
1
12,<color>,<speed>,<layer>
Copied!
Parameter
Type
Description
color
string
Marquee color
speed
unsigned long long
Update speed (ms)
layer
uint8_t
(Optional) Layer

Twinkle

Randomly twinkles a second color on top of a background color
1
13,<background>,<twinkle>,<duration>,<layer>
Copied!
Parameter
Type
Description
background
string
Background color
twinkle
string
Twinkle color
duration
unsigned long long
Twinkle speed (ms)
layer
uint8_t
(Optional) Layer

Sparkle

Randomly sparkles a color along the region on top of a background color
1
14,<background>,<sparkle>,<duration>,<layer>
Copied!
Parameter
Type
Description
background
string
Background color
sparkle
string
Sparkle color
speed
unsigned long long
Sparkle speed (ms)
layer
uint8_t
(Optional) Layer
Last modified 1yr ago