Open gallm551 opened 6 years ago
Hey Martina! I'm actually having trouble with the same thing. Have you figured it out yet by any chance?
I think you need to define "h" as a variable ! if you define "h" as hue and make it so that the hue # is randomized, then it will work in the function you wrote.
Sorry, I just saw this! Basically, this fixed the whole thing! It was because h wasn't recognized as a value, just as a placeholder.
var roundtangle2 = document.querySelector(".roundtangle2");
var width = randomNumber(100, 600);
var height = randomNumber(200, 500);
roundtangle2.style.width = width + "px";
roundtangle2.style.height= height + "px";
var background = randomNumber(50, 150);
var borderColor = randomNumber(100, 350);
roundtangle2.style.background = hslColor(background, 40, 75);
roundtangle2.style.borderColor = hslColor(borderColor, 60, 70);
So I managed to randomize the sizes, but the colors won't randomize. I feel like it's something small that I'm overlooking, but I can't figure out what.