VOOZH about

URL: https://www.geeksforgeeks.org/reactjs/color-palette-generator-app-using-react/

⇱ Color Palette Generator app using React - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Color Palette Generator app using React

Last Updated : 12 Jul, 2025

Color Palette Generator App using ReactJS is a web application which enables use­rs to effortlessly gene­rate random color palettes, vie­w the colors, and copy the color codes to the­ clipboard with just a single click. There is also a search bar that allows the user to check different color themes for their specified color.

Let's have a quick look at what the final application will look like:

👁 gfg-(9)

Steps to Create the project:

Step 1: Create a react application by using this command

npm create vite@latest colorPaletteGenerator

Step 2: After creating your project folder, i.e. colorPaletteGenerator, use the following command to navigate to it:

cd colorPaletteGenerator

Folder Structure:

👁 Image

The updated dependencies in package.json file will look like

 "dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
},
"devDependencies": {
"@vitejs/plugin-react": "^4.6.0",
"vite": "^7.0.4"
}

Example: Write the below code in App.js file and App.css in the src directory

Steps to run the Application:

  • Type the following command in the terminal:
npm run dev
  • Type the following URL in the browser:
http://localhost:5173/

Output:

Comment