4 ms·
Anyone looking for a single line code to generate a random hex color: var randomColor = Math.floor(Math.random()*16777215).toString(16);
by kanakiyajay 12y ago
Anyone looking for a single line code to generate a random hex color:
var randomColor = Math.floor(Math.random()*16777215).toString(16);
- oneeyedpigeon 12y agoFYI that's almost the first thing mentioned in the article!