# 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/)
Raw data
{
"_id": null,
"home_page": "https://github.com/msherburne/prettyPic",
"name": "prettyPic",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "image,pretty,python3,color",
"author": "msherburne",
"author_email": "mathieusherburne@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/ad/14/b2aa882933530ce9aceda38680cbe2f1d647017caea2206968d7f684f7ff/prettypic-1.2.1.tar.gz",
"platform": null,
"description": "# prettyPic\nA fairly simple image utility library that has one single purpose: to extract the dominant color from an image.\n\n## Installation\n```bash\npip install prettyPic\n```\n\n## Usage\n```python\nfrom prettypic import color_from_image\n\ncolor = color_from_image('path/to/image.png')\nprint(color.color)\n```\n### KMeans or DBSCAN\n```python\nfrom prettypic import color_from_image\n\ncolor = color_from_image('path/to/image.png', algorithm='kmeans')\n# or\ncolor = color_from_image('path/to/image.png', algorithm='dbscan')\n```\n#### Response\n```python\ncolor.color # (r, g, b)\ncolor.color_as_image # PIL.Image\ncolor.color_as_rgb # rgb(rrr, ggg, bbb)\n```\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "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.",
"version": "1.2.1",
"project_urls": {
"Documentation": "https://github.com/msherburne/prettyPic",
"Homepage": "https://github.com/msherburne/prettyPic",
"Repository": "https://github.com/msherburne/prettyPic"
},
"split_keywords": [
"image",
"pretty",
"python3",
"color"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "35ac237be2298afd11adbb32777a49e3768012345e46ac26a49fa4ceba567d98",
"md5": "cf9a47f0172d55aa3b03111d43c00eb2",
"sha256": "b44a4c9d1ea5a65de898e6618eb846ec3884290b71e3c5cd7373a7e263719392"
},
"downloads": -1,
"filename": "prettypic-1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cf9a47f0172d55aa3b03111d43c00eb2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 3230,
"upload_time": "2023-08-30T21:37:00",
"upload_time_iso_8601": "2023-08-30T21:37:00.163626Z",
"url": "https://files.pythonhosted.org/packages/35/ac/237be2298afd11adbb32777a49e3768012345e46ac26a49fa4ceba567d98/prettypic-1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ad14b2aa882933530ce9aceda38680cbe2f1d647017caea2206968d7f684f7ff",
"md5": "5a59fa30407e32352e905f715866353f",
"sha256": "af96e399251f0acacd807f11e9a1cf868c58e34493160cb626d6b0ac33210b6e"
},
"downloads": -1,
"filename": "prettypic-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "5a59fa30407e32352e905f715866353f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 5995,
"upload_time": "2023-08-30T21:37:01",
"upload_time_iso_8601": "2023-08-30T21:37:01.746165Z",
"url": "https://files.pythonhosted.org/packages/ad/14/b2aa882933530ce9aceda38680cbe2f1d647017caea2206968d7f684f7ff/prettypic-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-30 21:37:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "msherburne",
"github_project": "prettyPic",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "prettypic"
}