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

Function setGradient

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

Source from the content-addressed store, hash-verified

7var rdmbtn=document.getElementById("random");
8
9function setGradient(){
10 body.style.background="linear-gradient(to right, "+color1.value+", "+ color2.value+")";
11 css.textContent=body.style.background+";";
12
13}
14function generateColor(){
15 var randomColor1=Math.floor(Math.random()*16777215).toString(16);
16 var randomColor2=Math.floor(Math.random()*16777215).toString(16);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected