A simple interactive web application that changes the color of a box when a button is clicked.
Color Generator is a lightweight web application that demonstrates basic DOM manipulation with JavaScript. It features a colored box and a button - when the button is clicked, the box changes to a random color.
- Clean, responsive user interface
- Random color generation
- One-click color changes
- Simple and lightweight code
No installation is required. Simply download the project files and open index.html in any modern web browser.
git clone https://github.com/raakdgol/Random_Color_Generator
Or download the ZIP file and extract it to your preferred location.
- Open
index.htmlin your web browser - Click the "Change Color" button to see the box change to a random color
- Click again for a new random color
GENERATE_RANDOM_COLOR/
│
├── index.html # Main HTML file
├── styles.css # CSS styling
├── script.js # JavaScript functionality
├── images/ # Images folder
│ └── bg-circle.svg
└── screenshot.png
└── README.md
The application uses JavaScript to:
- Generate a random hexadecimal color code
- Select the color box element in the DOM
- Update the box's background color when the button is clicked
The main color changing functionality is powered by JavaScript
You can easily customize this project by:
- Changing the default box color in the CSS
- Modifying the box dimensions
- Adding multiple color boxes
- Implementing different color generation algorithms
- Adding transitions or animations for color changes
This application works in all modern browsers:
- Chrome 60+
- Firefox 55+
- Safari 10+
- Edge 15+
Contributions are welcome! Please feel free to submit a Pull Request.
