In this question I found a lot of interesting functions to generate random colors.
I need a random color generator that accept Hue, Saturation and Darkness range and also number of colors that we need.
Actually I can write a random color generator but I don't have good understanding of relationship between color numbers and darkness, hue and saturation of a color. I want the function export colors in an array.
I also made a jsfiddle file here for testing:
function get_random_color() {
var letters = '0123456789ABCDEF'.split('');
var color = '#';
for (var i = 0; i < 6; i++ ) {
color += letters[Math.round(Math.random() * 15)];
}
return color;
}
$.each($('div'),function(){
$(this).css('background-color', get_random_color());
});
Thanks