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

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -