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
Main/built-in
- RGB (0.0–1.0)
- HLS
- HSV
- YIQ
- RGB (0–255) (with
nice_colorsys.rgb255)
With hsluv via nice_colorsys.hsluv
- HSLuv
- CIELUV
- CIELCH
- CIEXYZ
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
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
File details
Details for the file nice_colorsys-0.2.0.tar.gz.
File metadata
- Download URL: nice_colorsys-0.2.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2af6fe750555c5da8fba6c52351dd0beda0819aad69cfa8aa65a1e565b3c88e0
|
|
| MD5 |
ffba84b9b8ecb54ed315ae9a0f8ee3df
|
|
| BLAKE2b-256 |
307724f1b1b80cdb1a105fc0a99c37487b248639b68d2ba2206d2eb8b6e9124c
|
Provenance
The following attestation bundles were made for nice_colorsys-0.2.0.tar.gz:
Publisher:
package.yml on actapia/nice_colorsys
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nice_colorsys-0.2.0.tar.gz -
Subject digest:
2af6fe750555c5da8fba6c52351dd0beda0819aad69cfa8aa65a1e565b3c88e0 - Sigstore transparency entry: 195936322
- Sigstore integration time:
-
Permalink:
actapia/nice_colorsys@fb3062836dd40cca5ee90d0afccd5e733caffcc9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/actapia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@fb3062836dd40cca5ee90d0afccd5e733caffcc9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nice_colorsys-0.2.0-py3-none-any.whl.
File metadata
- Download URL: nice_colorsys-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5797321230c4e95223f43afdb35f383ad0cc6254b6819a90f53d7ef0ceab28dc
|
|
| MD5 |
d63f240683cef798e8a5ae82e96fbabd
|
|
| BLAKE2b-256 |
758ae20583e200c8bd1dfec73f43f592968ec6416227e210974d71a273166cd0
|
Provenance
The following attestation bundles were made for nice_colorsys-0.2.0-py3-none-any.whl:
Publisher:
package.yml on actapia/nice_colorsys
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nice_colorsys-0.2.0-py3-none-any.whl -
Subject digest:
5797321230c4e95223f43afdb35f383ad0cc6254b6819a90f53d7ef0ceab28dc - Sigstore transparency entry: 195936323
- Sigstore integration time:
-
Permalink:
actapia/nice_colorsys@fb3062836dd40cca5ee90d0afccd5e733caffcc9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/actapia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@fb3062836dd40cca5ee90d0afccd5e733caffcc9 -
Trigger Event:
release
-
Statement type: