====== Differences ====== This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
script_random_drawer_colors [2014/03/04 23:51] tbog created |
script_random_drawer_colors [2014/05/03 20:29] (current) tbog [About the script] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== About the script ====== | ||
+ | * Purpose : Set a random color to the background of the apps in the app drawer | ||
+ | * Author : [[http://www.google.com/+BogdanTautuTBog|TBog]] | ||
+ | * Link: [[https://plus.google.com/113157980543803349502/posts/6LmZGtuyW5d|request post]] | ||
+ | ====== How to use the script ====== | ||
+ | |||
+ | - Copy the script and paste it using the Script Editor | ||
+ | - Choose the script to appear in the Lightning menu | ||
+ | - Close Script Editor and from the Lightning menu run the script | ||
+ | |||
+ | ====== Script code ====== | ||
<code> | <code> | ||
var alpha=0x40; | var alpha=0x40; | ||
Line 31: | Line 42: | ||
for(var idx=items.getLength()-1; idx>=0; idx-=1) | for(var idx=items.getLength()-1; idx>=0; idx-=1) | ||
{ | { | ||
- | var c=hslToRgb( Math.random(), Math.random()*0.4+0.6, Math.random() ); | + | var c=hslToRgb( Math.random(), Math.random()*0.4+0.6, Math.random() * 0.6 ); |
var item=items.getAt(idx); | var item=items.getAt(idx); | ||
var e=item.getProperties().edit(); | var e=item.getProperties().edit(); |