MCPcopy Create free account
hub / github.com/codemistic/Web-Development / generateColor

Function generateColor

Gradient Background Generator/script.js:14–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13}
14function generateColor(){
15 var randomColor1=Math.floor(Math.random()*16777215).toString(16);
16 var randomColor2=Math.floor(Math.random()*16777215).toString(16);
17 body.style.background="linear-gradient(to right, #"+randomColor1+", #"+randomColor2+")";
18 css.textContent=body.style.background+";";
19}
20h4.textContent="(#ff0000 , #ffff00);"
21color1.addEventListener("input", setGradient);
22color2.addEventListener("input", setGradient);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected