Skip to content

Commit

Permalink
Colour addition
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankit-177 committed Mar 20, 2024
1 parent 86bb616 commit aa5d075
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ml-frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
.confetti {
width: 10px;
height: 10px;
background-color: #f39c12;
position: absolute;
top: 0;
animation: confetti-fall linear 4s infinite;
Expand Down Expand Up @@ -162,10 +161,19 @@ function createConfetti() {
confetti.className = 'confetti';
confetti.style.left = Math.random() * window.innerWidth + 'px';
confetti.style.animationDelay = Math.random() * 4 + 's';
confetti.style.backgroundColor = getRandomColor();
document.body.appendChild(confetti);
}
}
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
document.getElementById("checkCompatibility").addEventListener("click", makePrediction);
</script>
</body>
</html>
</html>

0 comments on commit aa5d075

Please sign in to comment.