https://github.com/giovananog/image-color-palette
Upload an image and discover the dominant colors of it
https://github.com/giovananog/image-color-palette
color-palette flask python
Last synced: about 1 month ago
JSON representation
Upload an image and discover the dominant colors of it
- Host: GitHub
- URL: https://github.com/giovananog/image-color-palette
- Owner: giovananog
- Created: 2024-01-20T01:01:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-30T14:04:26.000Z (11 months ago)
- Last Synced: 2025-02-01T19:13:05.578Z (3 months ago)
- Topics: color-palette, flask, python
- Language: HTML
- Homepage: https://image-color-palette.vercel.app
- Size: 912 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Color Palette


> A Flask web application to generate color palettes from images. Upload an image, and the application will display the image along with the dominant color palette.
## 🌟 Features
- Upload an image to generate its color palette.
- Choose the number of colors you want to see in the palette.
- View the image and its color palette on the result page.## 📂 Files
- **functions.py**: Contains the function `get_colors` that extracts color palettes from an image.
- **server.py**: The Flask application script with routes and image processing logic.
- **templates/index.html**: HTML template for the main page with image upload and color count options.## 🛠️ Usage
1. Run the Flask application using `python server.py`.
2. Open your web browser and go to `http://127.0.0.1:5000/`.
3. Upload an image by clicking on "Upload your image."
4. Choose the number of colors you want to see in the palette.
5. Click "Send" to generate the color palette.
6. View the uploaded image along with the generated color palette.## 🔧 Dependencies
- Flask
- Pillow (PIL)## 💻 How it Works
1. The user uploads an image.
2. The Flask application saves the image in the `static/uploads` folder.
3. The application generates the color palette using the `get_colors` function from `functions.py`.
4. The image along with the color palette is displayed on the result page.## 🚀 Getting Started
To get a local copy up and running, follow these simple steps:
1. **Clone the repository**:
```sh
git clone https://github.com/giovananog/image-color-palette.git
```
2. **Navigate to the project directory**:
```sh
cd image-color-palette
```
3. **Run the Flask application**:
```sh
python server.py
```## 🎓 Developed During Python Bootcamp
This Image Color Palette project was developed as part of the 100 Days of Code - The Complete Python Pro Bootcamp ([Course](https://www.udemy.com/course/100-days-of-code/)). It showcases the skills acquired during the course, including web development with Flask, image processing with Pillow, and user interface design with HTML templates.