Skip to content

Athari22/ImageColourPaletteGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Image Colour Palette Generator

Application Screenshot

A Flask web application that extracts and analyzes dominant colors from uploaded images.

✨ Features

  • Upload JPG/PNG/JPEG images
  • Extract top 10 dominant colors using K-means clustering
  • Display color names, HEX, and RGB values
  • Generate harmonious color palettes
  • Fully responsive design
  • Interactive color visualization

πŸ–ΌοΈ Demo Samples

Home Page Results Page 1 Results Page 2
Home Result1 Result2

πŸ› οΈ Installation

# Clone the repository
git clone https://github.com/yourusername/color-analyzer.git
cd color-analyzer

# Create virtual environment
python -m venv venv

# Activate environment
# Windows:
.\venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the application
python main.py

πŸš€ Usage

  1. Access the application at http://localhost:5000
  2. Upload an image file (JPG/PNG/JPEG)
  3. View the extracted color palette
  4. Copy color values or download the palette

πŸ—οΈ Project Structure

Image Colour Palette Generator/
β”œβ”€β”€ demo/
β”‚   β”œβ”€β”€ Home.png               # Main screenshot
β”‚   β”œβ”€β”€ Results.png            # Sample result 1
β”‚   └── Results2.png           # Sample result 2
β”œβ”€β”€ static/
β”‚   └── uploads/
β”‚       └── .gitkeep           # Maintains empty folder
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ base.html              # Base template
β”‚   β”œβ”€β”€ index.html             # Main page
β”‚   └── results.html           # Results page
β”œβ”€β”€ main.py                     # Main application
β”œβ”€β”€ requirements.txt           # Dependencies
β”œβ”€β”€ README.md                  # Project documentation
└── .gitignore                 # Ignore rules

πŸ“ Requirements

  • Python 3.8+
  • Flask 2.0+
  • Pillow
  • NumPy
  • scikit-learn