I want to put inside an array, the hexadecimal colors debts from a variable, so I have the all different colors inside the array.
I have the following example, but when using colors it does not work:
var color=[];
var n_elements =10 ;
var inc=0;
//65535 número maximo
var step=parseInt(65535/n_elements);//#FFFFFF
for(i=0;i<=65535;i+=step){
var hexString = i.toString(16);
color[inc]="#"+hexString;
console.log(color[inc]);
inc++;
}