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.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

colourmap-1.2.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colourmap-1.2.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for colourmap-1.2.0.tar.gz
Algorithm Hash digest
SHA256 29eda4457859d30cf5da024566cb05ba278f3905bd25167b1d725b57abe2e9ce
MD5 0d7d5db6efdd6bfab55973e81c5ecc19
BLAKE2b-256 31c26f4c3f88730078b7deca4201809cc166ee841095891e93a64e66d65c0cfe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colourmap-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for colourmap-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 320ca636f4108b55cff8d0343f732c5cb991c310d7ceb394830d00799767b6bb
MD5 8be1a9d8bbfcea95c2aa59e9e23a2702
BLAKE2b-256 0fe227ae7a7e000fd5fd0628f519803c4d773fe8681c9da330110063a9b467a8

See more details on using hashes here.

Supported by

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