Change rgb function name

This commit is contained in:
lolabird 2023-11-10 08:26:39 -07:00
commit b7666e1ca8

View file

@ -51,7 +51,9 @@ function getGridDimensions() {
function colorGrid() {
if (isRgb) {
this.style.background = rgbColor();
this.style.background = randomizeColor();
} else if (isTint) {
} else {
this.style.background = colorValue;
}
@ -66,6 +68,12 @@ function changeColor() {
isRgb = false;
}
if (buttonID === "tint") {
isTint = true;
} else {
isTint = false
}
switch (buttonID) {
case "whiteColor":
colorValue = "white";
@ -88,7 +96,7 @@ function changeColor() {
}
}
function rgbColor() {
function randomizeColor() {
let r = Math.floor(Math.random() * 255);
let g = Math.floor(Math.random() * 255);
let b = Math.floor(Math.random() * 255);