A color library for CSS colors.
Project description
ColorAide
This is still a work in progress.
While ColorAide is very usable and out of the alpha stage, it is currently in a prerelease > state. This simply means the API could still be in flux to some degree. ColorAide is still technically waiting for > some issues related to CSS color syntax and behavior to be decided by the CSS Working Group.
Overview
ColorAide is a color library for Python with the intent of providing an easy to use interface to work with colors.
>>> from coloraide import Color
>>> c = Color("red")
>>> c.to_string()
'rgb(255 0 0)'
>>> c.convert('hsl').to_string()
'hsl(0 100% 50%)'
>>> c.set("lch.chroma", 30).to_string()
'rgb(173.81 114.29 97.218)'
>>> Color("blue").mix("yellow", space="lch").to_string()
'rgb(255 65.751 107.47)'
ColorAide is a continually evolving project, but was created with a number of specific goals in mind:
-
Be generally easy to pick up for the average user.
-
Support modern CSS color spaces and syntax as well as a number of popular non-CSS color spaces.
-
Provide a plugin API to extend color spaces and more.
-
Provide a number of useful utilities such as interpolation, color distancing, blending, gamut mapping, etc.
-
Allow users to configure defaults to their liking.
With ColorAide, you can specify a color, convert it to other color spaces, mix it with other colors, output it in different CSS formats, and much more!
Documentation
https://facelessuser.github.io/coloraide
License
MIT
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
File details
Details for the file coloraide-0.14.0.tar.gz
.
File metadata
- Download URL: coloraide-0.14.0.tar.gz
- Upload date:
- Size: 8.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 145bf2f32a70358e07b09876e5f14d4a010a2bd8fe7478ef09770430ecee2324 |
|
MD5 | e5b4bd4ea37b3f11beb134e1e3d64d4e |
|
BLAKE2b-256 | 86eb65ccddbfa953501056bf9343cb128662af40b9cb73e3ceae6e644c2d78ac |
File details
Details for the file coloraide-0.14.0-py3-none-any.whl
.
File metadata
- Download URL: coloraide-0.14.0-py3-none-any.whl
- Upload date:
- Size: 95.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99c67499725655a25db93dda5daf3dd91ec780c309d94e6386c885e9327dbc43 |
|
MD5 | 9176e507560e00e848b6622458ff0dbe |
|
BLAKE2b-256 | 937209893cdb09c156b8676d730fe293e29054909257ab23212f974913aeb304 |