how to get random colors in js

145

js random hex color -

'#'+Math.floor(Math.random()*16777215).toString(16);

how to get random colors in js -

var randomColor = Math.floor(Math.random()*16777215).toString(16);

Comments

Submit
0 Comments