DEV Community

Discussion on: Vanilla JavaScript random colours

Collapse
 
lionelrowe profile image
lionel-rowe • Edited

Good point, forgot about that. A simpler fix would probably be hexStr.padStart(6, '0').