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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -