semvec/pypi-packages huggingface dataset:
prettyPic 1.2.1
Takes a picture and finds the best color equality using machine learning. The use case this was built for was album cover backdrops, but others exist.
License: MIT
Requires Python: >=3.9,<4.0
Keywords: image,pretty,python3,color

# prettyPic
A fairly simple image utility library that has one single purpose: to extract the dominant color from an image.

## Installation
```bash
pip install prettyPic
```

## Usage
```python
from prettypic import color_from_image

color = color_from_image('path/to/image.png')
print(color.color)
```
### KMeans or DBSCAN
```python
from prettypic import color_from_image

color = color_from_image('path/to/image.png', algorithm='kmeans')
# or
color = color_from_image('path/to/image.png', algorithm='dbscan')
```
#### Response
```python
color.color # (r, g, b)
color.color_as_image # PIL.Image
color.color_as_rgb # rgb(rrr, ggg, bbb)
```

## License
[MIT](https://choosealicense.com/licenses/mit/)