Project: colourmap

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

Project Details

Latest version
1.1.16
Home Page
https://erdogant.github.io/colourmap
PyPI Page
https://pypi.org/project/colourmap/

Project Popularity

PageRank
0.0027872862745157664
Number of downloads
53078

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 :)