Skip to content
Snippets Groups Projects
Commit f6027ed0 authored by asl337's avatar asl337
Browse files

Merge branch 'FixedGenerateRandomColor' into 'main'

Update CI-ColorWebs/wwwroot/js/site.js

See merge request fds23/64/team-3/color-website!4
parents 3bec7709 c82713f4
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ const context = canvas.getContext("2d");
const cre = () => {
var ranColor = [];
for (var i = 0; i <= 5; i++){
const randomColor = Math.floor(Math.random()*16777215).toString(16);
const randomColor = "000000".replace(/0/g,function(){return (~~(Math.random()*16)).toString(16);});
ranColor.push(randomColor)
}
color.innerHTML = "#" + ranColor[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment