A simple React application that generates random colors in both hex and RGB formats. Users can switch between hex and RGB color modes and generate random colors with a click of a button. The background color of the application changes to the generated color.
- Generates random colors in hex and RGB formats
- Switch between hex and RGB color modes
- Background color changes to the generated color
- Displays the generated color code
-
Clone the repository:
git clone https://github.com/Piyushchannawar/Random-Color-Generator.git cd Random-Color-Generator
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
.
- Open the application in your browser.
- Click the "Create hex color" button to switch to hex color mode.
- Click the "Create RGB color" button to switch to RGB color mode.
- Click the "Generate Random Color" button to generate a random color in the selected mode.
- The background color will change to the generated color, and the color code will be displayed on the screen.