Skip to main content

Color palettes for your palate

Project description

TastyMap

🎨 Color palettes for your palate 😋

Make, customize, and/or use colormaps, any way you like.

tastykitchen

📖 Quick start

Start cooking from pre-made colormaps...

from tastymap import cook_tmap

tmap = cook_tmap("viridis", num_colors=12, reverse=True)
tmap

viridis_12

Or start from scratch!

from tastymap import cook_tmap

tmap = cook_tmap(
    ["red", "green", "blue"],
    num_colors=256,
    reverse=True,
    name="rgb",
)
tmap

rgb_256

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

example

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

image

Try to craft your visual delight interactively with the TastyKitchen UI, hosted here.

tastymap ui

Check out the docs for more recipes!

📦 Installation

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]

build codecov PyPI version

Documentation: https://ahuang11.github.io/tastymap/

Source Code: https://github.com/ahuang11/tastymap

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

tastymap-0.4.1.tar.gz (23.2 kB view hashes)

Uploaded Source

Built Distribution

tastymap-0.4.1-py3-none-any.whl (17.9 kB view hashes)

Uploaded Python 3

Supported by

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