The Random Color Generator is a simple yet interactive web application built using HTML, CSS, and JavaScript. It dynamically generates a collection of vibrant color boxes, each displaying a unique hexadecimal color code. With just a click, users can instantly copy any color code to their clipboard, making it a handy tool for designers, developers, and anyone working with colors.
- HTML
For structuring the layout of color boxes and buttons. - CSS
For styling, grid layout, and hover effects. - JavaScript
For generating random colors, updating the DOM, and implementing the clipboard copy functionality.
- Dynamic Color Generation – Multiple random colors are generated every time the app runs or refreshes.
- Hex Code Display – Each box clearly shows the corresponding hex color code.
- One Click Copy – A Copy button below each color allows users to instantly copy the color code to the clipboard.
- Clipboard Confirmation – A popup alert confirms the successful copy action.
- Responsive Layout – The grid of color boxes adapts neatly to different screen sizes.
- User - Friendly Interface – Clean, minimal, and easy to use design.
- When the page loads, JavaScript dynamically generates random hex color codes.
- Each color code is assigned as the background color of a box and displayed as text on top of it.
- Below each box, there is a Copy button.
- On clicking the button :
- The respective hex code is copied to the clipboard using the Clipboard API.
- A confirmation popup message is shown to the user.


