A color library for Python.
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
Hashes for coloraide-0.15.0.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 415d1d74961e1f10a141f1a20ca8f3b8e92d5239fbba3fbee55edd26d241ebe4 |
|
MD5 | 719662c64b78c6bdb4ffb21e93eb475b |
|
BLAKE2b-256 | 6d61e2f04ad470b7eb312e3ad2d3dcc70150be2dc6d4789d0ee3c0bf5018e56e |