Skip to main content

Python package colourmap generates an N unique colors from the specified input colormap.

Project description

colourmap

Python PyPI Version License Github Forks GitHub Open Issues Project Status Downloads Downloads Sphinx

* Colourmap generates an unique lit of RGB and HEX colors for the specified input list.

⭐️ Star this repo if you like it ⭐️

Documentation pages

On the documentation pages you can find more information about colourmap with examples.

Install colourmap from PyPI
pip install colourmap     # normal install
pip install -U colourmap  # update if needed

Import colourmap package

from colourmap import colourmap

Quick example

Use the documentation pages for more detailed usage. Some of the most used functionalities are linked below.

from colourmap import colourmap

# Create N colors
c = colourmap.generate(10)

# From list
c_rgb, c_dict = colourmap.fromlist([1,1,2,2,3,1,2,3])

# to HEX
c_hex = colourmap.rgb2hex(c_rgb)

Example: Generate N unique colors from a specific colormap

Example: Generate unique colors based on input labels

Example: Create unique colors based on seaborn or matplotlib

Example: Conversion RGB to HEX

Example: Conversion HEX to RGB

Example: Create a linear gradient between colors


Maintainer

  • Erdogan Taskesen, github: erdogant
  • Contributions are welcome.
  • For citations, please use the citation at the right side panel.
  • If you wish to buy me a Coffee for this work, it is very appreciated :)

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

colourmap-1.2.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

colourmap-1.2.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file colourmap-1.2.1.tar.gz.

File metadata

  • Download URL: colourmap-1.2.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for colourmap-1.2.1.tar.gz
Algorithm Hash digest
SHA256 86b614f458b301145e52f5aaf6f270911021eeb6170a42ce3354b2c5b70e3cf1
MD5 4cd5915099a8567d85ccd4dcec91dbc8
BLAKE2b-256 7677d38688a9146377415cbbc5e2f30d2dc4cd4681faddf574e1dc5de29d7d15

See more details on using hashes here.

File details

Details for the file colourmap-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: colourmap-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for colourmap-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4dac30026b072fc210fa23ddaf17b48fbf5c75b947425e9ab10b514afdcef39f
MD5 325ea69c384f252aa947e2f4ea39a49b
BLAKE2b-256 5ac1d7637c217a189562e8dfcd0535b2971e3e898b6249d56324f2164d9b38c5

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