Skip to main content

PyPI Python package PyPI - License

ochre 🏜️

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

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.

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)

Source distribution for ochre 0.4.0
File Size Uploaded
ochre-0.4.0.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ochre 0.4.0
File Interpreter ABI Platform
ochre-0.4.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page