Colorbar Generator

Pick discrete interval colors and export snippets for Python, CSS, and JSON.

Made for scientific researchers: start from common Matplotlib colormaps (viridis, cividis, plasma, inferno) and tweak discrete colorbar steps.

Intervals

Select a famous scientific colormap, then tweak any interval color.
Discrete segments. Export uses the same order as shown below.
Export current colors or paste a JSON array to import.

Preview

Python (Matplotlib)

MATLAB

CSS (Linear Gradient)

JSON

Matplotlib colorbar generator

This tool helps scientific researchers build discrete colormaps for Matplotlib colorbars. Start from common scientific colormaps (viridis, cividis, plasma, inferno, magma, turbo), adjust individual interval colors, and export ready-to-use code.

Use cases: discrete contour plots, heatmaps, classified rasters, and publication-ready figure styling.