The Color API - In Python!
Your python project involves some colors? We got you! Now, its easier then ever to manipulate colors, and even get color names, just with a couple commands.
thecolorapi.com
This module is simply a python wrapper for the API provided by thecolorapi.com, and created by Josh Beckman - he did the hard work!
A simple example
>>> from thecolorapi import color
>>> dark_green = color(hex="#158f2b")
>>> dark_green.hex
'#158F2B'
>>> dark_green.hex_clean
'158F2B'
>>> dark_green.rgb
(21, 143, 43)
>>> dark_green.rgb_fraction
(0.08235294117647059, 0.5607843137254902, 0.16862745098039217)
>>> dark_green.hsl
(131, 74, 32)
>>> dark_green.hsl_fraction
(0.36338797814207646, 0.7439024390243902, 0.3215686274509804)
>>> dark_green.hsv
(131, 85, 56)
>>> dark_green.hsv_fraction
(0.36338797814207646, 0.8531468531468531, 0.5607843137254902)
>>> dark_green.cmyk
(85, 0, 70, 44)
>>> dark_green.cmyk_fraction
(0.8531468531468531, 0, 0.6993006993006992, 0.4392156862745098)
>>> dark_green.contrast_hex
'#000000'
>>> dark_green.name
'Slimy Green'
Installation
It can not get easier! Just run:
$ (sudo) pip install thecolorapi
Metadata
Release files for thecolorapi 1.0.0
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 |
|---|---|---|---|---|
| thecolorapi-1.0.0.tar.gz | 4.2 kB | Without provenance | Details for thecolorapi-1.0.0.tar.gz |
Release files / thecolorapi-1.0.0.tar.gz
| Download URL | thecolorapi-1.0.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a569b5ebbc0ca721c4c9feda982ee59f32e121c62bbbde3cd0a756807cc1df90
|
|
BLAKE2b-256 checksum How to use checksums |
cb1359fa89a1daacbe0a8eb5da1f41112d5d4bc9eb3bbca1ef727ef024a849de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.6.7
|
Security for thecolorapi 1.0.0
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.