js random hex color
snippet in javascript

js random hex color

user4126

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

random color in javascript

user721

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