()
| 30 | // Pick a random hex color |
| 31 | function getColor(){ |
| 32 | function col(){ |
| 33 | let hex = random(255).toString(16); |
| 34 | //always return 2 values, even if a 0 is apended |
| 35 | return ('0' + String(hex)).substr(-2); |
| 36 | } |
| 37 | return '#' + col() + col() + col(); |
| 38 | } |
| 39 |