Skip to main content

A tiny Python package for working with colors in a pragmatic way

Project description

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.

Project details


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)

Uploaded Source

Built Distribution

ochre-0.4.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

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

Hashes for ochre-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ecbd7632416038f925dc1cc7446c2b863246c36a1c44bb73d7e0fcc773e3c716
MD5 3b72b80b8002bd5fa217c4976679b05e
BLAKE2b-256 2adcc9f58298ce87564913e3e3c2eac0c9c1d93fe5d864d54975a66820bd6a44

See more details on using hashes here.

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

Hashes for ochre-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d64b3a055b455103cb90ea6c1cf7c15519b7dd146e3ff2677481a33f54b885b
MD5 ee04921b17ada25fbdb90d5b7ad29818
BLAKE2b-256 3b585d62363742a0fe4e7d3b4d596f80ccdbcdfd281d647e89698a31fc27f8e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page