Skip to main content

A color library for CSS colors.

Project description

Donate via PayPal Discord Build Coverage Status PyPI Version PyPI - Python Version License

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

coloraide-0.12.0.tar.gz (7.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coloraide-0.12.0-py3-none-any.whl (97.4 kB view details)

Uploaded Python 3

File details

Details for the file coloraide-0.12.0.tar.gz.

File metadata

  • Download URL: coloraide-0.12.0.tar.gz
  • Upload date:
  • Size: 7.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.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for coloraide-0.12.0.tar.gz
Algorithm Hash digest
SHA256 f4808901b4e4fbdf28f84afcecd180f980f832a0d4879001e7047ce7631020c5
MD5 51829d10cc741152b788be5dbadb4dc9
BLAKE2b-256 a07f835380834b9d037f7c2df435de27b59d53c9e59d825284826f2c083ed795

See more details on using hashes here.

File details

Details for the file coloraide-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: coloraide-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 97.4 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.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for coloraide-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6edca405e65475a7c679cf3092d8cfbdf8dba20b2761c611401abe66b9b2a40c
MD5 b67c0eb85a07196b518f876c5cef9542
BLAKE2b-256 c7324a8418a2c44cd0b56bb33bc647c9c2d02294e821e3d94f0473eea1212117

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page