Skip to main content

A python package for easy management of colors and palettes.

Project description

docs/source/_static/image/readme_palette_picker.png

What is colorir?

colorir is a package used to create and manipulate color palettes.

Main features

  • Create color schemes and save them to use in different projects

  • Interpolate colors in different formats (such as RGB, CIELab etc) to make gradients and color maps

  • Have access to a curated selection of unique color palettes and color names

  • Easily visualize swatches of colors in the terminal

Getting started

It is very easy to create an original and attractive color palette with colorir:

import colorir as cl
grad = cl.PolarGrad(["ffff00", "ff00ff"])  # Creates a gradient from yellow to magenta
palette = cl.StackPalette(grad.n_colors(5))  # Samples 5 colors along the gradient and creates a palette with them
palette *= cl.HCLab(1, 0.5, 1)  # Desaturates the palette 50% to get a more pleasing look
cl.swatch(palette)  # Shows the palette we created in the terminal
docs/source/_static/image/readme_palette.png

colorir also works seamlessly with other python packages and you don’t have to convert colorir objects to pass them as input to other frameworks:

import matplotlib.pyplot as plt

plt.pie([0.25, 0.15, 0.20, 0.20, 0.20], colors=palette)
plt.show()
docs/source/_static/image/readme_pie_chart.png

For more information (including use-cases and examples), see colorir’s documentation here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colorir-2.0.5.tar.gz (107.3 kB view details)

Uploaded Source

Built Distribution

colorir-2.0.5-py3-none-any.whl (135.9 kB view details)

Uploaded Python 3

File details

Details for the file colorir-2.0.5.tar.gz.

File metadata

  • Download URL: colorir-2.0.5.tar.gz
  • Upload date:
  • Size: 107.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for colorir-2.0.5.tar.gz
Algorithm Hash digest
SHA256 00db51e2211798f5b3bd0836b1a9abfe506eb98981e1fa680eb0d4ff9b7bbf25
MD5 a169524da3205fd08139629d3ad18f9d
BLAKE2b-256 47910a360a2c58833f2851bfed4179cd9551dac0f02839b6d3db37f54dd5ab77

See more details on using hashes here.

File details

Details for the file colorir-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: colorir-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 135.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for colorir-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5c6fc8e4e0f40e6cb0d86183f66f25d38d95864cb4cb8fa1ad0be9d04da167e8
MD5 d6fbe937dff84fbad30c010b20c3be8c
BLAKE2b-256 b19b15e8f447c7e6a292df3105a0a15362e4eb70d6a9eaff2ced096dd5c7092d

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