DEV Community

Discussion on: Random colour with JavaScript

Collapse
 
lexlohr profile image
Alex Lohr

You could also use (16777216 * (1 + Math.random()) | 0).toString(16).slice(1).