Browse docslightbar.set
On this page
API method

lightbar.set

Sends a Remote Play lightbar command using one #RRGGBB/0xRRGGBB string (including rgb.* constants) or three 0 to 255 bytes.

Syntax

Atlas Script
lightbar.set(color_or_r, g?, b?)

Parameters

color_or_r
Either one Atlas RGB color value, or the red component when the separate green and blue arguments are also supplied.
g Optional
Green color component, normally in the documented byte range.
b Optional
Blue color component, normally in the documented byte range.

Return value

See the remarks for the returned value and runtime behavior.

Remarks

Sends a Remote Play lightbar command using one #RRGGBB/0xRRGGBB string (including rgb.* constants) or three 0 to 255 bytes. Literal color names and CSS-style rgb(...) strings are not parsed. The color latches until reset; device support is required, non-Remote-Play hosts reject feedback.

Examples

Set and reset the lightbar.atlas
event on_input() {
    if (input.pressed("up")) {
        lightbar.set(rgb.blue);
    }
    if (input.pressed("down")) {
        lightbar.reset();
    }
}
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.