About Me

Click the screen to randomize the background gradient

My Hobbies
Coding I really enjoy programming with HTML, CSS, and JavaScript, and I like making games and other programs in my free time.

For example, this is the 20 lines of JavaScript code I wrote that allows the program to generate over one quadrillion unique color gradients.

To begin, I created nine variables. r1, g1, b1, r2, g2, and b2 all represent rgb color values for the two colors in the gradient; side and corner represent the direction the gradient will face; and direction creates a string of top left, top, top right, or right. When the screen is clicked, the function changeColor() is called. The function randomizes the rgb variables from 0 to 255. Math.round(Math.random()) will return either 0 or 1, so by setting side and corner to that randomized value, the next lines determine what direction will be set to. Finally, the program sets the background image of the page to a color gradient, blending the two random colors together, directed towards a random corner or side.

Playing with my dog Hershey I love playing with my puppy Hershey, even when he sometimes barks at people.
Reading I like reading books in my free time.