https://github.com/erdogant/colourmap
Colourmap is for wrangling RGB and HEX colors.
https://github.com/erdogant/colourmap
colorization colormap colorscheme conversion hex python rgb
Last synced: 9 months ago
JSON representation
Colourmap is for wrangling RGB and HEX colors.
- Host: GitHub
- URL: https://github.com/erdogant/colourmap
- Owner: erdogant
- License: other
- Created: 2020-01-19T16:09:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-24T19:01:46.000Z (about 1 year ago)
- Last Synced: 2025-04-13T09:12:31.063Z (about 1 year ago)
- Topics: colorization, colormap, colorscheme, conversion, hex, python, rgb
- Language: Python
- Homepage: https://erdogant.github.io/colourmap
- Size: 3.34 MB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# colourmap
[](https://img.shields.io/pypi/pyversions/colourmap)
[](https://pypi.org/project/colourmap/)
[](https://github.com/erdogant/colourmap/blob/master/LICENSE)
[](https://github.com/erdogant/colourmap/network)
[](https://github.com/erdogant/colourmap/issues)
[](http://www.repostatus.org/#active)
[](https://pepy.tech/project/colourmap)
[](https://pepy.tech/project/colourmap)
[](https://erdogant.github.io/colourmap/)
*`` Colourmap`` generates an unique lit of RGB and HEX colors for the specified input list.
#
**⭐️ Star this repo if you like it ⭐️**
#
### [Documentation pages](https://erdogant.github.io/colourmap/)
On the [documentation pages](https://erdogant.github.io/colourmap/) you can find more information about ``colourmap`` with examples.
#
##### Install colourmap from PyPI
```bash
pip install colourmap # normal install
pip install -U colourmap # update if needed
```
### Import colourmap package
```python
from colourmap import colourmap
```
#### Quick example
Use the documentation pages for more detailed usage. Some of the most used functionalities are linked below.
```python
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](https://erdogant.github.io/colourmap/pages/html/Examples.html#)
#
#### [Example: Generate unique colors based on input labels](https://erdogant.github.io/colourmap/pages/html/Examples.html#create-color-based-on-input-labels)
#
#### [Example: Create unique colors based on seaborn or matplotlib](https://erdogant.github.io/colourmap/pages/html/Examples.html#color-generated-by-seaborn-and-matplotlib)
#
#### [Example: Conversion RGB to HEX](https://erdogant.github.io/colourmap/pages/html/Examples.html#convert-rgb-to-hex)
#
#### [Example: Conversion HEX to RGB](https://erdogant.github.io/colourmap/pages/html/Examples.html#convert-rgb-to-hex)
#
#### [Example: Create a linear gradient between colors](https://erdogant.github.io/colourmap/pages/html/Examples.html#linear-gradient-between-two-colors)
### Maintainer
* Erdogan Taskesen, github: [erdogant](https://github.com/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 :)