Skip to main content

A color library for Python.

Project description

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

ColorAide

Overview

ColorAide is a pure Python, object oriented approach to 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 particularly has a focus on the following:

  • Accurate colors.

  • Proper round tripping (where reasonable).

  • Be generally easy to pick up for the average user.

  • Support modern CSS color spaces and syntax.

  • Make accessible many new and old non-CSS color spaces.

  • Provide a number of useful utilities such as interpolation, color distancing, blending, gamut mapping, filters, correlated color temperature, color vision deficiency simulation, etc.

  • Provide a plugin API to extend supported color spaces and approaches to various utilities.

  • 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-4.7.2.tar.gz (19.9 MB view details)

Uploaded Source

Built Distribution

coloraide-4.7.2-py3-none-any.whl (267.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coloraide-4.7.2.tar.gz
  • Upload date:
  • Size: 19.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for coloraide-4.7.2.tar.gz
Algorithm Hash digest
SHA256 7e898e2ad177873809bd1f5fdb1d90618ad874049fead952ff4470d157666d4b
MD5 34a5fbac13f24c7e03d2f662b0a8ccfe
BLAKE2b-256 6d28634dfc08f605d0120781f907dcf2c00f5d44ee00ae6244030a0fb41322a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for coloraide-4.7.2.tar.gz:

Publisher: deploy.yml on facelessuser/coloraide

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: coloraide-4.7.2-py3-none-any.whl
  • Upload date:
  • Size: 267.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for coloraide-4.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 45b73cfbc155b779bc44c638a13b27209681c8513baebaa53ec05eb1173233a4
MD5 839ecfa784460034cf200a39b30f4564
BLAKE2b-256 b01f35ea889c901d869c2910a6381d65c3785ebd513ea4dabb8702b01738d3ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for coloraide-4.7.2-py3-none-any.whl:

Publisher: deploy.yml on facelessuser/coloraide

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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