MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / col

Function col

assets/js/click_shape_JS.js:32–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30// Pick a random hex color
31function 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

Callers 1

getColorFunction · 0.70

Calls 1

randomFunction · 0.70

Tested by

no test coverage detected