taro
taro copied to clipboard
function getRandomHEXColor
adding getRandomHEXColor function to generate random hex codes
you can make this with modd.io scripts but its just long and pain this can finish it in just a function
Cool stuff, but what would be the practical use of this? I think you should at least make it able to get a random hex code between a range of values, for example random color between #000020 and #0000FF (each third of the code would have its own range since hex color codes are three two-digit numbers together)
Also:
returnValue = '#' + Math.floor(Math.random() * 0xffffff).toString(16).padStart(6, '0')
:trollface:
Plus, you're using a global variable i in your for loop (line 979), declare it with let instead