MCPcopy Create free account
hub / github.com/HashLips/generative-art-opensource / genColor

Function genColor

index.js:35–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34// generate a random color hue
35const genColor = () => {
36 let hue = Math.floor(Math.random() * 360);
37 let pastel = `hsl(${hue}, 100%, 85%)`;
38 return pastel;
39};
40
41const drawBackground = () => {
42 ctx.fillStyle = genColor();

Callers 1

drawBackgroundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected