The Background Generator is a simple web application that allows users to generate and customize linear gradient backgrounds. Users can choose up to three colors using color pickers, randomize the colors, and copy the generated CSS code to use in their projects.
- This project was created by Maruf Ovi and generously gifted to Tahsin Zidane.
-
Color Selection: Users can choose three colors using color pickers to define the gradient background.
-
Randomize Colors: The "Randomize Colors" button generates random color values for the gradient background.
-
Copy CSS: The "Copy CSS" button copies the generated CSS code to the clipboard, making it easy for users to implement the gradient in their projects.
-
Open
index.htmlin a web browser. -
Use the color pickers to select the desired colors for the gradient.
-
Click the "Randomize Colors" button to generate random colors.
-
Click the "Copy CSS" button to copy the CSS code for the current gradient.
-
index.html: The main HTML file that contains the structure of the web page.
-
style.css: The stylesheet that defines the appearance of the web page.
-
script.js: The JavaScript file that handles user interactions and updates the gradient accordingly.
The project uses the 'Raleway' font, sets a specific color for the text, and centers the content. The background is initially set to a linear gradient from red to yellow.
-
setGradient(): Updates the background gradient based on the selected colors.
-
randomizeColors(): Generates random color values for the gradient.
-
copyToClipboard(): Copies the generated CSS code to the clipboard.
-
getRandomColor(): Generates a random hexadecimal color code.
This project is licensed under the MIT License.