Metadata-Version: 2.4
Name: color-palette-extractor
Version: 1.1.0
Summary: Extract dominant colors, generate PNG palettes, JSON exports, and name colors using custom palettes.
Author: Youssef Helioui
License: MIT License
        
        Copyright (c) 2026
        
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow
Requires-Dist: numpy
Requires-Dist: scikit-learn
Requires-Dist: colormath
Dynamic: license-file

# 🎨 Color Palette Extractor

A modern Python package for extracting dominant colors from images, generating PNG palette previews, exporting color data to JSON, and naming colors using any custom palette (e.g., Pantone, Material, Brand palettes).

This package includes:
- Dominant color extraction using K-Means
- RGB or HEX output
- PNG color palette image generation
- JSON export
- Optional color naming using custom palettes (Pantone-compatible if you provide the licensed palette)
- Command-line interface (`colorpalette`)
- Clean import API for integration in other scripts

## Installation
Run:
```
pip install .
```

## CLI Usage
```
colorpalette input.jpg --colors 5 --format hex --json palette.json --png palette.png
```

## Color Naming
Provide a custom palette JSON:
```
colorpalette input.jpg --name-colors --palette pantone.json
```

## Python Usage
```
from color_palette_extractor import extract_palette
colors, names = extract_palette("image.jpg", num_colors=5, output_format="hex")
```

## Package Structure
color_palette_extractor/
- extractor.py
- palette_image.py
- utils.py
- color_naming.py
- cli.py
- __init__.py

## License
MIT License
