A very small library that may offer a nicer way of working with color systems.
Project description
nice_colorsys
This is a very small library that may offer a nicer way of working with and converting between color systems than the default Python colorsys library.
In this library, a color in each supported color system is represented as a
namedtuple
with to_
methods for converting to different color systems.
Supported color systems
- RGB (0.0–1.0)
- RGB (0–255) (via rgb255.py)
- HLS
- HSV
- YIQ
- HSLuv (via nice_hsluv.py)
Example
from nice_colorsys import *
print(hsv(0.5, 1, 1).to_hls())
# Output:
#
# hls(hue=0.5, lightness=0.5, saturation=1.0)
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
nice_colorsys-0.0.1.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file nice_colorsys-0.0.1.tar.gz
.
File metadata
- Download URL: nice_colorsys-0.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ab5f14fb29705f5f2190596a3e3522da7cf81781f08d2e3c22ef8dfd8ec7a84 |
|
MD5 | 436aa2fae264c102f7d1afb325cd4f23 |
|
BLAKE2b-256 | 0924f3a671faceb470f4d68e6390d1582c61596f5154e4e13a58cd7fd6828f6a |
File details
Details for the file nice_colorsys-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: nice_colorsys-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbdf5ff86e1351015de3d0fc488fbeb8cbbe039bc1f4b7531ccf343901a4c2f8 |
|
MD5 | 146d83985eb760929f02ab3e938546f8 |
|
BLAKE2b-256 | 8c89cbd5aee72afcd74c687c4611d1c72be4c48a4b69bac5989f5c99bce6a43a |