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

Function getRandomColor

RandomQuoteGenerator/js/script.js:174–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172
173//Function to select random rgb color value
174function getRandomColor () {
175 var red = Math.floor(Math.random() * 256 );
176 var green = Math.floor(Math.random() * 256 );
177 var blue = Math.floor(Math.random() * 256 );
178 var randomColor = 'rgb(' + red + ',' + green + ',' + blue + ')';
179 return randomColor;
180}
181
182//Function to call the getRandomQuote function and stores the returned quote object in a variable
183//Constructs a string containing the different properties of the quote object

Callers 1

printQuoteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected