Skip to main content
Version: 2.3.0

LED

Requires API Version 1.1.0 or higher

The LED API enables real-time control of the notification RGB LEDs located at the back of the displays, providing visual notifications and status indicators within the costume. This API supports priority-based control and color management for both left and right notification LEDs.

Brightness Configuration

You can change LED brightness by following this guide.

LED Priority Value

You can change resource pack LED priority value by following this guide.


Functions​

luniris.leds.acquireLeds()​

luniris.leds.acquireLeds()

Requests exclusive LED control from the system and locks the resource until explicitly released.

LED Priority Value

Features with a higher priority value than the resource pack will retain priority access to the LEDs.


luniris.leds.releaseLeds()​

luniris.leds.releaseLeds()

Releases LED control back to the system, unlocking access for features with lower priority.


luniris.leds.setLeds(r0, g0, b0, r1, g1, b1)​

--[[
- Values range from 0.0 (off / black) to 1.0 (full brightness / white)
- r0, g0, b0 = Left notification LED
- r1, g1, b1 = Right notification LED
]]--
luniris.leds.setLeds(r0, g0, b0, r1, g1, b1)

Sets the colors for both notification LEDs. The applied colors persist until modified again.


Example​

-- First, acquire control of the LEDs
luniris.leds.acquireLeds()

-- Set the left LED to white and turn off the right LED
luniris.leds.setLeds(1, 1, 1, 0, 0, 0)

-- Finally, release control to avoid blocking other features
luniris.leds.releaseLeds()