Make some Chrismas light inside JS

Hello!

I got a question about make some Chrismas light. The light is going to change between color white and yellow randomly.

Down bellow i´ve got some idea how a possible solution could look like. But this generate a 360 wheel with random colors, not just two:

sqeere[3].addEventListener(“click”, function(){
var color = Math.floor(Math.random()*360)
squere[3].style.backgroundColor=“hsl(”+color+",100%,50%)";

Would be nice if someone could share some ideas!

you need hex:

https://www.w3schools.com/colors/colors_hexadecimal.asp

full RG and random B

thats it! :slight_smile: