A premium desktop toolkit for fast, accurate, and fully offline color analysis.
Detect, convert, match, mix, extract, and build color systems from images or live camera feed.
- Pixel-accurate click detection from uploaded images and live camera frames.
- Fast color intelligence powered by KDTree matching and K-Means palette extraction.
- Designer-ready outputs in HEX, RGB, HSV, HSL, and CMYK with one-click copy.
- Built-in harmony generation, favorites, and history for practical workflow speed.
- Smooth desktop UX with modern CustomTkinter components and theme transitions.
Run instantly without installing Python:
Packaged executable is large (around 370 MB) because it bundles computer-vision and ML dependencies.
- Image upload: JPG, JPEG, PNG, BMP, GIF, WebP
- Live webcam color detection and instant snapshot capture
- Click-to-detect sampling from any point in the image
- Dominant palette extraction using K-Means clustering
- Nearest named color matching using KDTree search
- 265+ color database entries
- Full format conversion: HEX, RGB, HSV, HSL, CMYK
- Copy any code format directly to clipboard
- Harmony sets: complementary, triadic, analogous, split-complementary
- Interactive color mixer with blend ratio slider
- Gradient gallery with presets and custom gradient creation
- CSS gradient string generation and copy support
- Recent color history
- Favorites management (persisted to local JSON)
- Light and dark appearance toggle with smooth transition
- Offline-first workflow with local data storage
- Python 3.8+
- Webcam (optional, for camera mode)
cd Color_detection
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python main.pyflowchart LR
A[Image Upload or Camera Frame] --> B[OpenCV RGB Processing]
B --> C[Point Sampling / Palette Extraction]
C --> D[KDTree Color Name Matching]
C --> E[Format Conversion Engine]
C --> F[Harmony + Creative Tools]
D --> G[UI Info Panel]
E --> G
F --> G
G --> H[History and Favorites Persistence]
| Layer | Technology |
|---|---|
| UI | CustomTkinter |
| Image Processing | OpenCV |
| Numeric Processing | NumPy |
| ML / Search | scikit-learn (KMeans, KDTree) |
| Image Handling | Pillow |
| Packaging | PyInstaller |
Color_detection/
|- main.py
|- requirements.txt
|- ColorDetectionPro.spec
|- core/
| |- color_detector.py
| |- color_matcher.py
| \- color_converter.py
|- ui/
| |- app.py
| \- components/
|- data/
| |- colors.json
| \- user_data.json
|- utils/
\- tests/
- Launch the app and choose Upload Image or Camera Capture.
- Click any pixel to detect and identify color details.
- Review color name confidence and all format conversions.
- Extract dominant palette or explore harmonies.
- Save key colors to Favorites for later reuse.
- Batch image processing mode
- Exportable palette formats (ASE, GPL, JSON)
- Enhanced accessibility panel (contrast pair testing)
- Plugin-style color datasets
Contributions, ideas, and improvements are welcome.
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a pull request