A tiny Python package for working with colors in a pragmatic way
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ochre-0.4.0.tar.gz
(10.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ochre-0.4.0-py3-none-any.whl
(9.6 kB
view details)
File details
Details for the file ochre-0.4.0.tar.gz.
File metadata
- Download URL: ochre-0.4.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-22-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecbd7632416038f925dc1cc7446c2b863246c36a1c44bb73d7e0fcc773e3c716
|
|
| MD5 |
3b72b80b8002bd5fa217c4976679b05e
|
|
| BLAKE2b-256 |
2adcc9f58298ce87564913e3e3c2eac0c9c1d93fe5d864d54975a66820bd6a44
|
File details
Details for the file ochre-0.4.0-py3-none-any.whl.
File metadata
- Download URL: ochre-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-22-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d64b3a055b455103cb90ea6c1cf7c15519b7dd146e3ff2677481a33f54b885b
|
|
| MD5 |
ee04921b17ada25fbdb90d5b7ad29818
|
|
| BLAKE2b-256 |
3b585d62363742a0fe4e7d3b4d596f80ccdbcdfd281d647e89698a31fc27f8e9
|