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.
To install the package, simply run the following command:
pip install dominant_image_color
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)
These dependencies will be automatically installed when you install the package using pip.
- Pillow
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