DEV Community

Discussion on: How to Generate random hex color values in javascript

Collapse
 
namanthanki profile image
Naman Thanki


function generateRandomHexColor() {
return `#${Math.random().toString(16).substring(2, 8)}`;
}


I think you could just do this also