ochre 🏜️
A down-to-earth approach to colors
ochre is a tiny Python package for working with colors in a pragmatic way. The focus is on simplicity and ease of use, but also on human perception.
Features
- 🎨 Focus on RGB and HCL color spaces
- 🖥️ Web color names
- ♻️ Color conversions that easily integrate with the
standard
colorsysmodule - 🗑️ Zero dependencies
- 🐍 Python 3.8+
Installation
$ pip install ochre
Usage
In [1]: from ochre import Hex
In [2]: color = Hex("#CC7722")
In [3]: color.web_color
Out[3]: WebColor('peru')
In [4]: color = color.hcl
In [5]: color.hue
Out[5]: 0.6373041934059377
In [6]: import math
In [7]: color.hue += math.radians(30)
In [8]: color.hue
Out[8]: 1.1609029690042365
In [9]: color.web_color
Out[9]: WebColor('goldenrod')
Credits
Photo by Nicola Carter on Unsplash.
Metadata
Release files for ochre 0.4.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 |
|---|---|---|---|---|
| ochre-0.4.0.tar.gz | 10.0 kB | Without provenance | Details for ochre-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ochre-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for ochre-0.4.0-py3-none-any.whl |
Total release size: 19.7 kB
Release files / ochre-0.4.0.tar.gz
| Download URL | ochre-0.4.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecbd7632416038f925dc1cc7446c2b863246c36a1c44bb73d7e0fcc773e3c716
|
|
BLAKE2b-256 checksum How to use checksums |
2adcc9f58298ce87564913e3e3c2eac0c9c1d93fe5d864d54975a66820bd6a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-22-generic
|
Release files / ochre-0.4.0-py3-none-any.whl
| Download URL | ochre-0.4.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d64b3a055b455103cb90ea6c1cf7c15519b7dd146e3ff2677481a33f54b885b
|
|
BLAKE2b-256 checksum How to use checksums |
3b585d62363742a0fe4e7d3b4d596f80ccdbcdfd281d647e89698a31fc27f8e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-22-generic
|
Security for ochre 0.4.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.