Make, customize, and/or use colormaps, any way you like.
Try to craft your visual delight interactively with the TastyKitchen UI, hosted here.
tastymap ui
![image](https://private-user-images.githubusercontent.com/15331990/378037600-902bfc6b-e36c-4d3a-8c30-7c00276d45aa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMDAyNzksIm5iZiI6MTczOTE5OTk3OSwicGF0aCI6Ii8xNTMzMTk5MC8zNzgwMzc2MDAtOTAyYmZjNmItZTM2Yy00ZDNhLThjMzAtN2MwMDI3NmQ0NWFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE1MDYxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhMWNlOGI4MTBkYTg1ZDgyNzQ4MWQxMTQ4ZmU5NTI0MzI5M2UwNTVmZmY1OGQ5NmI1MjlkODU1NDlhNjA5Y2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4JXasgYRBAmS-SobAQcgd44XxBP9BsTjDNrTu9cJVCU)
Or, start cooking from pre-made colormaps...
from tastymap import cook_tmap
tmap = cook_tmap("viridis", num_colors=12, reverse=True)
tmap
Or start from scratch!
from tastymap import cook_tmap
tmap = cook_tmap(
["red", "green", "blue"],
num_colors=256,
reverse=True,
name="rgb",
)
tmap
Then pair it with your plots effortlessly:
import numpy as np
from matplotlib import pyplot as plt
from tastymap import cook_tmap, pair_tbar
fig, 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:
from tastymap import ai
tmap = ai.suggest_tmap("Pikachu")
tmap
Check out the docs for more recipes!
To get started on your culinary color journey, install tastymap
with:
pip install tastymap
To get access to TastyKitchen UI, install tastymap
with:
pip install tastymap[ui]
Documentation: https://ahuang11.github.io/tastymap/
Source Code: https://github.com/ahuang11/tastymap