Skip to main content

A color library for Python.

Project description

Donate via PayPal 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-8.8.1.tar.gz (22.0 MB view details)

Uploaded Source

Built Distribution

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

coloraide-8.8.1-py3-none-any.whl (346.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for coloraide-8.8.1.tar.gz
Algorithm Hash digest
SHA256 8a59c2639b735d0c0479f82829c88b617a0caa92fd58f9838eac71865c1c93a0
MD5 b52bc369f872820d850f9e926cb87327
BLAKE2b-256 a9f62d54d752354091b02862c15ddb8451ff7ca6c19e67dc71692a5d80b48e12

See more details on using hashes here.

Provenance

The following attestation bundles were made for coloraide-8.8.1.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-8.8.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for coloraide-8.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7cca1cd4089368d6282f7c4fac2a78c8403af48d89e318a8553939e2728e82d
MD5 1364c6bebad5ab879cb9a353b67175e1
BLAKE2b-256 20d44c00d0027b0cba0e8cc1e03dfdedf1507c5e885dbb96bdb641f170a904dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for coloraide-8.8.1-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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page