Skip to content

renfamilyguy/get-linearGradient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-linearGradient

Visit Website

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.

Contributors

Features

  • 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.

Usage

  1. Open index.html in a web browser.

  2. Use the color pickers to select the desired colors for the gradient.

  3. Click the "Randomize Colors" button to generate random colors.

  4. Click the "Copy CSS" button to copy the CSS code for the current gradient.

Project Structure

  • 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.

Styles

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.

JavaScript Functions

  • 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.

License

This project is licensed under the MIT License.

About

Create your custom linear-gradinet background for web pages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors