This project is part of the @zerotomastery JavaScript task, focusing on creating a gradient generator with additional features.
We began with a shared function, setGradient()
, which allowed users to set a gradient based on the colors selected with input elements.
As part of the course, the following optional tasks were suggested for students to explore:
-
Match Background on Page Load: write code that makes the color inputs match the background gradient generated on the first page load.
-
Display Initial CSS Linear Gradient Property: display the initial CSS linear gradient property upon page load. I also included a reset button for users to revert to this initial state.
-
BONUS: Add a Random Button: As an additional challenge, I created a "Random" button that generates two random colors for the gradient. Initially, I developed a random RGB generator function on my own, but later I found a more efficient solution and linked the source in the JavaScript file's comment section.
To explore and utilize the source code of this project, please visit the GitHub repository. Enjoy using the source code!