A robust python library for colour conversion between colour models.
Project description
acid: 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
Example Usage
from acid 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
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
ketamine-1.0.0.tar.gz
(11.3 kB
view hashes)
Built Distribution
Close
Hashes for ketamine-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5836b7fd08118c16b57ec79e98a42608f4b4e76aa6b08473b5340c635b92bce0 |
|
MD5 | 3b22aa69b00b6d60df0c4753912bc895 |
|
BLAKE2b-256 | 371dfaeba04d15d27ac6de85f11a94e4e9218376a58e6ea54397ac5aae9a9764 |