Day 4 – Random background colors

Yeah, so today I decided to really get inspired by Jennifer Dewalt. I decided to do the exact same project as her on her 4th day: A random background color generator!

Props to Jennifer for using such a cool function to find a random HEX number – even my BF was impressed and didn’t know that could be done! High five!

This is actually a really easy project as soon as I understood the function Jennifer used (I went to her GitHub to check out her projects). I decided to do a little something extra, so I made the buttons background-color random as well. Also every time the page is loaded both the background-color on the body-tag and the button are random.

Go generate some random background colors!

So, what about today? Did I learn something new?:

  • I definitely enjoyed learning about the math.random function and finding out how to combine it with other functions in order to find a random HEX number.
  • Other than that, I really hope that this anxiety I get when having to understand functions and variables and arrays, will go away or at least become much smaller after these 100 days.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s