ColorSeeker is a web application built with Flask and Bootstrap5 that allows users to upload images and identify the most dominant colors present in those images. The application uses k-means clustering from the scikit-learn
library to analyze and determine the main colors.
A live version of ColorSeeker is available at the following link: https://colorseeker.onrender.com.
- Image Upload: Users can upload images to the application to analyze them.
- Dominant Color Extraction: Utilizes k-means clustering to find and display the 5 most dominant colors in the uploaded image.
- Responsive UI: Built with Bootstrap5, the interface is user-friendly and responsive, adapting to various devices.
- Color Display: Shows the dominant colors as color swatches next to the uploaded image.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Before you can run the app, you will need to have Python installed on your system. The app was developed using Python 3.9, but it should be compatible with any Python 3.x version. You will also need pip
to install Python dependencies.
Follow these steps to get your development environment running:
-
Clone the repository
git clone https://github.com/BAXTOR95/ColorSeeker.git cd ColorSeeker
-
Set up a Python virtual environment (Optional but recommended)
python -m venv .venv source venv/bin/activate # On Windows use `.venv\Scripts\activate`
-
Install the required dependencies
pip install -r requirements.txt
-
Start the Flask application
python app.py
Your app should now be running on http://localhost:5000.
To use ColorSeeker, follow these steps:
- Navigate to http://localhost:5000 in your web browser.
- Click the Choose File button and select an image from your computer.
- Click the Submit button to upload the image and analyze it.
- View the dominant colors displayed as color swatches and the image preview on the result page.
ColorSeeker processes images using the following steps:
- Image Upload: The user uploads an image file through the web interface.
- Color Analysis: The backend reads the image, resizes it for faster processing, and then uses the k-means clustering algorithm to find the most common colors.
- Results Display: The frontend displays these colors as swatches and shows the uploaded image for comparison.
- Flask - The web framework used.
- Bootstrap5 - The front-end framework used for responsive design.
- NumPy - Handles data structures and transformations for image processing.
- Pillow - Used for opening, manipulating, and saving many different image file formats.
- scikit-learn - Used for applying the k-means clustering algorithm.
- Brian Arriaga - Initial work - BAXTOR95
This project is licensed under the MIT License - see the LICENSE.md file for details.