summaryrefslogtreecommitdiff
path: root/share/scripts/s_group_color.lua
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-23 20:48:02 +0100
committerRobin Gareus <robin@gareus.org>2020-02-23 20:48:02 +0100
commit180843f9bd28b191c7404245ba0a121107992511 (patch)
treec60312dc09f76c2f55ba2383245c427e15c38dea /share/scripts/s_group_color.lua
parentbf649cd68ad46c34a656700aa6cb89416d648c64 (diff)
Also move Lua scripts to share subfolder
Diffstat (limited to 'share/scripts/s_group_color.lua')
-rw-r--r--share/scripts/s_group_color.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/share/scripts/s_group_color.lua b/share/scripts/s_group_color.lua
new file mode 100644
index 0000000000..d8c0785ed7
--- /dev/null
+++ b/share/scripts/s_group_color.lua
@@ -0,0 +1,11 @@
+ardour { ["type"] = "Snippet", name = "Randomize Group Colors" }
+
+function factory () return function ()
+ for grb in Session:route_groups ():iter () do
+ local r = math.random (0, 255)
+ local g = math.random (0, 255)
+ local b = math.random (0, 255)
+ local rgba = (r << 24) + (g << 16) + (b << 8) + 0xff
+ grp:set_rgba(rgba)
+ end
+end end