Skip to content
Snippets Groups Projects
Commit c82713f4 authored by php46's avatar php46
Browse files

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

parent 3bec7709
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ const context = canvas.getContext("2d"); ...@@ -7,7 +7,7 @@ const context = canvas.getContext("2d");
const cre = () => { const cre = () => {
var ranColor = []; var ranColor = [];
for (var i = 0; i <= 5; i++){ 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) ranColor.push(randomColor)
} }
color.innerHTML = "#" + ranColor[0]; color.innerHTML = "#" + ranColor[0];
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment