Get the most frequent color from an image
Project description
Dominant Image Color
A Python package to extract the dominant color of an image. Given the path to an image file, the get_image_color function returns the hex code of the most frequent color in the image.
Installation
To install the package, simply run the following command:
pip install dominant_image_color
Usage
Here's an example of how to use the get_image_color function:
from dominant_image_color import get_image_color
hex_code = get_image_color("path/to/image.jpg")
print(hex_code)
Dependencies
These dependencies will be automatically installed when you install the package using pip.
- Pillow
Contributions
Contributions to this package are welcome. If you have any suggestions or bug reports, feel free to open an issue or a pull request on Github. https://github.com/itsmdsameerkhan/dominant-image-color
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file dominant_image_color-1.0.1.tar.gz.
File metadata
- Download URL: dominant_image_color-1.0.1.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9909a58745aef0ef4ec5e7036e93c67d27c4c82fbe69ca3815bfc51451101692
|
|
| MD5 |
b5791f1f593c571ca86450859c5674e2
|
|
| BLAKE2b-256 |
a053df1bd9334928de2fae35dee8ab5954819481384a70ac0de7e21ff07e4299
|