ketamine: A robust python library for colour conversion.
A python library for colour conversion between colour models.
Supported Colour Models
- RGB, RGBA, hex
- HSL
- HSV
- CMYK
- CIELAB
- CIEXYZ
Installation
pip install ketamine
or install it from source:
git clone https://github.com/sertdfyguhi/ketamine/
cd ketamine
python3 -m build
pip install dist/*.whl
Example Usage
from ketamine import Colour
white = Colour.from_rgb(255, 255, 255)
print(white.to_hex()) # #ffffff
print(white.to_hsl()) # (0, 0.0, 1.0)
hsv = Colour.from_hsv(184, 0.85, 1.0)
print(hsv.to_rgb()) # (38.25000000000001, 240.54999999999995, 255.0)
# round RGB values first
hsv.round()
print(hsv.to_rgb()) # (38, 241, 255)
Todo
- Finish CIELAB colour conversion
- Correctly implement to_lab
- Finish CMYK colour conversion
- Publish to PyPI
Metadata
Release files for ketamine 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ketamine-1.0.1.tar.gz | 11.4 kB | Without provenance | Details for ketamine-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ketamine-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for ketamine-1.0.1-py2.py3-none-any.whl |
Total release size: 25.7 kB
Release files / ketamine-1.0.1.tar.gz
| Download URL | ketamine-1.0.1.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b63aa5367474c18de48c2687e30159791e0ddb95b85ba81cd0c96bc61efcc4dd
|
|
BLAKE2b-256 checksum How to use checksums |
c55ed7da39a58a233e1ca9a6755e8c0193f25902e0c7f6814ace83cfa515a33f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / ketamine-1.0.1-py2.py3-none-any.whl
| Download URL | ketamine-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c9a377f196328a200d80879a57b941febba9fc652d01437e7e176874cd73c338
|
|
BLAKE2b-256 checksum How to use checksums |
7256aa36fa3226b16b255625492c819546c8f470c08eff2591e3bec6775de2e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for ketamine 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.