Do you need to create random colors ? I do, mostly for my testing purpose code where no images are involved because I want to keep it light.
so here you have a the code for such a function
Code
<action name="getColor">
getRandomColor(0x); <!-- for layer -->
getRandomColor(#); <!-- for text -->
</action>
<action name="getRandomColor" type="Javascript" devices="html5"><![CDATA[
var letters = '0123456789ABCDEF';
var color = args[1];
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
krpano.set("randomColor", color);
]]></action>
Display More
I hope you enjoy it