Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
33 lines (22 loc) · 841 Bytes

File metadata and controls

33 lines (22 loc) · 841 Bytes

Snippets for LED Colors


The Loupedeck CT and Loupedeck Live Preferences panels now have the ability to use Lua Snippets to set what color you want an LED button to use.

The Snippet should return a hs.drawing.color object.

You can learn more about Lua on the CommandPost Developers site.


Examples

Set LED to Red

return hs.drawing.color.asRGB({hex="#FF0000"})

Set LED to random color

local a = hs.math.randomFromRange(0, 9)
local b = hs.math.randomFromRange(0, 9)
local c = hs.math.randomFromRange(0, 9)
local d = hs.math.randomFromRange(0, 9)
local e = hs.math.randomFromRange(0, 9)
local f = hs.math.randomFromRange(0, 9)

return hs.drawing.color.asRGB({hex="#"..a..b..c..d..e..f})