html5 - Need to get different Grey color shade randomly using jquery -


I am working on the HTML5 pie chart. For each of those values, I need different gray colors. I have n numbers, so this is not stable, can anyone help me on it so that I can generate a random gray color shadow code.

code like you:

  var a = Math.random ( ) * 254; Var B = Math. Floor (A / 8) * 8; $ (". Greybox") CSS ("background-color", "RGB (" + B + "," + B + "," + B + ")");  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -