Dominant colors in image
Project description
Fast colorthief
A Python module for selecting most dominant colors in the image. Based on https://github.com/fengsp/color-thief-py but faster.
Installation
Linux, MacOS 10.15 or newer:
pip install fast_colorthief
Other operating systems (CMake required):
git clone https://github.com/bedapisl/fast-colorthief
cd fast-colorthief
git submodule update --init --recursive
pip3 install .
Example
import fast_colorthief
image_path = 'image.jpg'
dominant_color = fast_colorthief.get_dominant_color(image_path)
color_palette = fast_colorthief.get_palette(image_path)
Benchmark
1200 x 1200 jpg image
Algorithm | Time per image |
---|---|
Fast colorthief (input numpy array) | 0.0012s |
Fast colorthief (input filename) | 0.034s |
Reference (https://github.com/fengsp/color-thief-py) (input filename) | 0.509s |
How does it work
Backend is written in C++ for better performance.
Uses Modified Median Cut Quantization algorithm.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file fast-colorthief-0.0.5.tar.gz
.
File metadata
- Download URL: fast-colorthief-0.0.5.tar.gz
- Upload date:
- Size: 754.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c943b5be73add8d3f295d3e314c9f48db8555fccc770ab09d88155ba060165ae |
|
MD5 | 5fa73954bb77c6876c2ed8f31ba136d3 |
|
BLAKE2b-256 | 462b9d4ae88af21fc22a87333632e9b26ec1ec711e0ed61ad48faeeff5068f76 |
File details
Details for the file fast_colorthief-0.0.5-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 61.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c5d18968983334f7f3a6e715714915d78d646531a0c3e527288443dee902ef3 |
|
MD5 | 22da30b186baa9932c0d468b017458e4 |
|
BLAKE2b-256 | f9a7a73105cca5320763657ae33a2ef1302a570e5a2baea02f7fa60a5e032ac8 |
File details
Details for the file fast_colorthief-0.0.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 67.4 kB
- Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4966e3bbb12d64af67b762327f65c01b2d742af75bb12e911970af176e30401 |
|
MD5 | 3b78be6acb5504fd62e7db60538678ac |
|
BLAKE2b-256 | 3cbdb65923166334a78e9076832b6515548796a5dac45ca616b642be815f61a2 |
File details
Details for the file fast_colorthief-0.0.5-cp312-cp312-macosx_12_0_universal2.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp312-cp312-macosx_12_0_universal2.whl
- Upload date:
- Size: 59.1 kB
- Tags: CPython 3.12, macOS 12.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a06f6bcae040b67d1682c64246e5e7065602bd1987585a207b2af1b93ba617eb |
|
MD5 | a259cb10728f195eed57958dbfb6165e |
|
BLAKE2b-256 | 0532ecee7c929d1143f781c0cbf685f1473d535ac15634dd2e6077e9f31ccf5c |
File details
Details for the file fast_colorthief-0.0.5-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 60.7 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bfde70f82c09ab269c33bf68b0ad49d21811ef8149d735fe0676b8af24d1b4c |
|
MD5 | d1ecba20542dd9f0a5e6cb65dc892a21 |
|
BLAKE2b-256 | f4a6a53e4708e6297c6c42b3d80a4fb0c6044cd92c5154db0af3b4cdf378be6a |
File details
Details for the file fast_colorthief-0.0.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 67.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c84410f2803ecce0716de7c1c8d30d9cfc7e1e2326d26f87877fb98c7d977d3c |
|
MD5 | 02e5e37587ea3ab48622013748bc4fe7 |
|
BLAKE2b-256 | c0694af513ce18251bafb4451cbc5b5623d0c02925a7c440ea9cee1ef434562b |
File details
Details for the file fast_colorthief-0.0.5-cp311-cp311-macosx_12_0_universal2.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp311-cp311-macosx_12_0_universal2.whl
- Upload date:
- Size: 58.2 kB
- Tags: CPython 3.11, macOS 12.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67d445a8860c906b2b08b7297c44f3f6699a3b44868443f3209c664d1cb93c74 |
|
MD5 | eb2a15c256ae4fb1da18d6394f29355a |
|
BLAKE2b-256 | 25ec76745fdd114441202dd8a74e041f77e7356d3dd3a37248bcb07bdc2d17b1 |
File details
Details for the file fast_colorthief-0.0.5-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 60.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d87b29bad6f3b94fbf576d5fa6da4a729773e68822569326480cf31139226fc |
|
MD5 | d0365464faad16647873a77be8c2ebf2 |
|
BLAKE2b-256 | 30320183e26a735ec67aa19a6b90bccf9f6b959c811679869592b6f606c98991 |
File details
Details for the file fast_colorthief-0.0.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 67.1 kB
- Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d18d8c2b3b9844be8bf7885386309e710bb9e567176d07d05297e7d3a818fa2a |
|
MD5 | 7d82c37a611d7e51f91fb4a3caa93f4d |
|
BLAKE2b-256 | 49e9c1526195396094066a2eef8964c8d7757ac587ff05d101b4ff4e3ec5a4d6 |
File details
Details for the file fast_colorthief-0.0.5-cp310-cp310-macosx_12_0_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp310-cp310-macosx_12_0_x86_64.whl
- Upload date:
- Size: 58.2 kB
- Tags: CPython 3.10, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f9f9058fa499c00fb879a3915682ac49ac0993f5cb4249da6f1c016cc37e3d |
|
MD5 | 8436c66c2da0c1f5939b336f5180c1a6 |
|
BLAKE2b-256 | 4965e7663c8b3028c6da0c0276a0dfb33c25caadf13de6c9cc3974dcfe719a13 |
File details
Details for the file fast_colorthief-0.0.5-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 60.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f57c2fb9f5a8c6d6bbbce64d0c885ca8007e9c644d9adb506cd99e8e180e0c55 |
|
MD5 | 7ef25c2269ae872cb2aec6feea504fe7 |
|
BLAKE2b-256 | 3b2f5e85c16c777de645f0b92313ddb3f47d61588e3f02376039534da375fe20 |
File details
Details for the file fast_colorthief-0.0.5-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 67.1 kB
- Tags: CPython 3.9, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eab0feb58e696b83f38fea5671206b1930c280bd59ed51303a0049b3c1188e5a |
|
MD5 | f10bc4c87bfa2a606ab5aa2e9a323858 |
|
BLAKE2b-256 | 2327fdefacfc7d625f78496051e761bab1ee164168fe4229c0c3ddc919e5b1e2 |
File details
Details for the file fast_colorthief-0.0.5-cp39-cp39-macosx_12_0_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp39-cp39-macosx_12_0_x86_64.whl
- Upload date:
- Size: 58.3 kB
- Tags: CPython 3.9, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 229bced62a75f6e0136587b7277aa124f6d17cc32997665fd0a3b353528d7c77 |
|
MD5 | 83c81572172f9ddd020aad87e4a3988f |
|
BLAKE2b-256 | f8bee1996d56649ce668ebb8c2b79f5e3b393fcd3d5d6ca4b64ce5f27fd6c2e5 |
File details
Details for the file fast_colorthief-0.0.5-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 60.7 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbe0610eab90ca6b051cbc05efc6088b5997ca440fdd187a253340ec59754a32 |
|
MD5 | aa2bac6d80db5bebfe080526c68717d7 |
|
BLAKE2b-256 | e5a2842bfcd885d0f7fe8fc946574b0ac5645e0f91c4d15ad86ee11830823994 |
File details
Details for the file fast_colorthief-0.0.5-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 67.0 kB
- Tags: CPython 3.8, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52bd19b6c74a40250d4a522187270a7ef8a34f9865514db3812998afb29b455d |
|
MD5 | a6bda4a9012a45e8fd891cddbc0a14c5 |
|
BLAKE2b-256 | eeb89097bfcc2cce4b3bd71f7cfb4a42ef257083994393516b03c7cd15bee47a |
File details
Details for the file fast_colorthief-0.0.5-cp38-cp38-macosx_12_0_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp38-cp38-macosx_12_0_x86_64.whl
- Upload date:
- Size: 58.3 kB
- Tags: CPython 3.8, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4228d6ef7c036e6fc316b36e9a5abbadd15a7afa57adbef2eeb4d27ed927c2e |
|
MD5 | 5df122dbd0d35a4606dcebfecf69adb9 |
|
BLAKE2b-256 | 71bd53861c22971e1a01da7bf6ab17c31bed48964115b232155649f4e43e2530 |
File details
Details for the file fast_colorthief-0.0.5-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 60.6 kB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9db355b1fa5b1b479e88f3b0e1044cb587a85712f317253eb986f96eb9e54fe7 |
|
MD5 | 870c6e6dee1f49399c04e315f7c6bde2 |
|
BLAKE2b-256 | 6ac3d7bd3553fbd6d98c10a1ea284469fdf32fd0d061ac38fe8594bf2e71ec5c |
File details
Details for the file fast_colorthief-0.0.5-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 68.0 kB
- Tags: CPython 3.7m, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cca73b6e327bad7ba59a9f808ccb3e8841d3b2e408c4058dc0d5502ec8615261 |
|
MD5 | ae252021ec0270f23ce72f3c5d011673 |
|
BLAKE2b-256 | 4189e58633a448fcd3227ddf687e36189dbfdb87e928883b723c63d30587a163 |
File details
Details for the file fast_colorthief-0.0.5-cp37-cp37m-macosx_12_0_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp37-cp37m-macosx_12_0_x86_64.whl
- Upload date:
- Size: 58.4 kB
- Tags: CPython 3.7m, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53e443086b8e8f223732782d40e2e36e5324229bb2d24fa9d750b59fb45210fa |
|
MD5 | 61875facd06d4dbb30d8d3de94163d32 |
|
BLAKE2b-256 | 99e2d46a6224a73842b229f9ca68f2acbbf972cd3e4518980d94f5ef93a5a86f |
File details
Details for the file fast_colorthief-0.0.5-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 60.6 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ab4688a898cd155a88e97928ca10a4e3e0b989f618712c84baff0190765ae73 |
|
MD5 | d1514ba582af3b6913cc38870134dd27 |
|
BLAKE2b-256 | 8f2cf0a103ba638f86579830d75716040e59316d4d4defb061a7662a3788878e |
File details
Details for the file fast_colorthief-0.0.5-cp36-cp36m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp36-cp36m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 68.0 kB
- Tags: CPython 3.6m, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11c7c21c742240a75b0b6c621dd4128e54eabe7c1859f6bcfcd66557cf32a2c9 |
|
MD5 | d3179715567dfd029b7c314ebe737310 |
|
BLAKE2b-256 | 45452d882f443b233541bc5fa3c8f082b0b95898c8763eb628c7697c9acfe35f |
File details
Details for the file fast_colorthief-0.0.5-cp36-cp36m-macosx_12_0_x86_64.whl
.
File metadata
- Download URL: fast_colorthief-0.0.5-cp36-cp36m-macosx_12_0_x86_64.whl
- Upload date:
- Size: 58.3 kB
- Tags: CPython 3.6m, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 582a3f7c99784b944853f0adb5e918cd5662a291e741014889dac2883978f99f |
|
MD5 | 6be8ba8dada157582c942aaf042f949d |
|
BLAKE2b-256 | f0459da58d0d8031b4067a35ffd4a3613d839da78df6c66f497db167c5016298 |