Calculates the closest colors from 2 lists
pip install a-pandas-ex-closest-color
from a_pandas_ex_closest_color import pd_add_closest_color
import pandas as pd
pd_add_closest_color()
colorlist = [
(0, 0, 0), # black
(230, 25, 75), # red
(60, 180, 75), # green
(255, 225, 25), # yellow
(0, 130, 200), # blue
(245, 130, 48), # orange
(145, 30, 180), # purple
(70, 240, 240), # cyan
(240, 50, 230), # magenta
(210, 245, 60), # lime
(250, 190, 190), # pink
(0, 128, 128), # teal
(230, 190, 255), # lavender
(170, 110, 40), # brown
(255, 250, 200), # beige
(128, 0, 0), # maroon
(170, 255, 195), # mint
(128, 128, 0), # olive
(255, 215, 180), # coral
(0, 0, 128), # navy
(128, 128, 128), # grey
(255, 255, 255), # white
(115, 12, 37), # dark red
(30, 90, 37), # dark green
(127, 112, 12), # dark yellow
(0, 65, 100), # dark blue
(122, 65, 24), # dark orange
(72, 15, 90), # dark purple
(35, 120, 120), # dark cyan
(120, 25, 115), # dark magenta
(105, 122, 30), # dark lime
(125, 95, 95), # dark pink
(0, 64, 64), # dark teal
(115, 95, 127), # dark lavender
(85, 55, 20), # dark brown
(127, 125, 100), # dark beige
(64, 0, 0), # dark maroon
(85, 127, 97), # dark mint
(64, 64, 0), # dark olive
(127, 107, 90), # dark coral
(0, 0, 64), # dark navy
(64, 64, 64), # dark grey
]
wanted_colors = [(255, 0, 0), (255, 255, 0), (0, 0, 0)]
df = pd.Q_find_closest_color(wanted_colors=wanted_colors,colorlist=colorlist)
print(df)
r g b rating rgb
0 230 25 75 82.9375 (255, 0, 0)
1 128 0 0 127.0000 (255, 0, 0)
2 245 130 48 139.0000 (255, 0, 0)
3 170 110 40 144.6250 (255, 0, 0)
4 115 12 37 145.2500 (255, 0, 0)
.. ... ... ... ... ...
121 250 190 190 367.0000 (0, 0, 0)
122 255 215 180 379.0000 (0, 0, 0)
123 230 190 255 392.5000 (0, 0, 0)
124 255 250 200 409.2500 (0, 0, 0)
125 255 255 255 441.7500 (0, 0, 0)
[126 rows x 5 columns]
Metadata
Release files for a-pandas-ex-closest-color 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| a_pandas_ex_closest_color-0.10.tar.gz | 4.6 kB | Without provenance | Details for a_pandas_ex_closest_color-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| a_pandas_ex_closest_color-0.10-py3-none-any.whl | Python 3 | none | any | Details for a_pandas_ex_closest_color-0.10-py3-none-any.whl |
Total release size: 11.0 kB
Release files / a_pandas_ex_closest_color-0.10.tar.gz
| Download URL | a_pandas_ex_closest_color-0.10.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
895225f015defd38d7e08eae5ff2dbb644f28428f3ae7932e339380e598ac91a
|
|
BLAKE2b-256 checksum How to use checksums |
9fcb0e7998e09b80719479e38175686d4aa962866f967a78d5c7ad27b6a5be7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / a_pandas_ex_closest_color-0.10-py3-none-any.whl
| Download URL | a_pandas_ex_closest_color-0.10-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f21011d0cd0ad43008a7701c00ee924e337ae34450df9cbbe7b9211628b66982
|
|
BLAKE2b-256 checksum How to use checksums |
ef0b6b644ddf7e3e3959844d33ff6dc2a30c6502f249f4476ba9886b9c1680cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for a-pandas-ex-closest-color 0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.