Skip to main content

A color library for Python.

Project description

Donate via PayPal Discord Build Coverage Status PyPI Version PyPI Downloads 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.18.0.tar.gz (10.8 MB view details)

Uploaded Source

Built Distribution

coloraide-0.18.0-py3-none-any.whl (117.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coloraide-0.18.0.tar.gz
  • Upload date:
  • Size: 10.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for coloraide-0.18.0.tar.gz
Algorithm Hash digest
SHA256 9175589e17044c762336c2940ee5c99638ea1629e1638169e2684291ebb96f0f
MD5 c9bc8e594cc8e7a9b8e235f93f60f1a6
BLAKE2b-256 7d393475b130281b87f967896a9558ad10a283c1069a442733c97b85aec0d524

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coloraide-0.18.0-py3-none-any.whl
  • Upload date:
  • Size: 117.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for coloraide-0.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cfc5b5c6f0c90878d40a0634b92471d1aa512bb8daf28b0727330c4c13d9b7c
MD5 989c06b41dc9c5a176665a60494ff88b
BLAKE2b-256 5c98ce298e5ac0bff42792cdaf412c9e46f41e991d5fa9f97768acf2d9d8e490

See more details on using hashes here.

Supported by

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