https://github.com/ahuang11/tastymap
🎨 colormaps cooked for your palate
https://github.com/ahuang11/tastymap
cmap colorbar colormaps customize data-visualization matplotlib palette python
Last synced: about 1 month ago
JSON representation
🎨 colormaps cooked for your palate
- Host: GitHub
- URL: https://github.com/ahuang11/tastymap
- Owner: ahuang11
- License: mit
- Created: 2023-09-25T03:46:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-19T00:52:00.000Z (6 months ago)
- Last Synced: 2025-03-18T09:03:18.712Z (about 1 month ago)
- Topics: cmap, colorbar, colormaps, customize, data-visualization, matplotlib, palette, python
- Language: Python
- Homepage: https://ahuang11.github.io/tastymap/
- Size: 90.8 KB
- Stars: 29
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# TastyMap
## 🎨 Color palettes for your palate 😋
Make, customize, and/or use colormaps, any way you like.

## 📖 Quick start
Try to craft your visual delight *interactively* with the TastyKitchen UI, hosted [here](https://huggingface.co/spaces/ahuang11/tastykitchen).
```bash
tastymap ui
```
Or, start cooking from pre-made colormaps...
```python
from tastymap import cook_tmaptmap = cook_tmap("viridis", num_colors=12, reverse=True)
tmap
```
Or start from scratch!
```python
from tastymap import cook_tmaptmap = cook_tmap(
["red", "green", "blue"],
num_colors=256,
reverse=True,
name="rgb",
)
tmap
```
Then pair it with your plots effortlessly:
```python
import numpy as np
from matplotlib import pyplot as plt
from tastymap import cook_tmap, pair_tbarfig, ax = plt.subplots()
img = ax.imshow(np.random.random((10, 10)))
tmap = cook_tmap(["red", "green", "blue"], num_colors=256)
pair_tbar(
img,
tmap,
bounds=[0, 0.01, 0.5, 1],
labels=["zero", "tiny", "half", "one"],
uniform_spacing=True,
)
```
Or if you need suggestions, get help from AI by providing a description of what you're imagining:
```python
from tastymap import aitmap = ai.suggest_tmap("Pikachu")
tmap
```
Check out the [docs](https://ahuang11.github.io/tastymap) for more recipes!
## 📦 Installation
To get started on your culinary color journey, install `tastymap` with:
```bash
pip install tastymap
```To get access to TastyKitchen UI, install `tastymap` with:
```bash
pip install tastymap[ui]
```---
[](https://github.com/ahuang11/tastymap/actions)
[](https://codecov.io/gh/ahuang11/tastymap)
[](https://badge.fury.io/py/tastymap)**Documentation**: https://ahuang11.github.io/tastymap/
**Source Code**: https://github.com/ahuang11/tastymap