DEV Community

loading...

Discussion on: Generate and Set Pseudorandom Hexadecimal Background Color Using JavaScript

Collapse
stereobooster profile image
stereobooster
() => `#${Math.floor(Math.random()*(16777215 + 1)).toString(16).padStart(6,"0")}`