Skip to content

palettize show

The show command renders a colormap preview in the terminal, or writes a PNG or SVG.

Terminal window
palettize show [PRESET_NAME] [OPTIONS]
ArgumentDescription
PRESET_NAMEPreset name (e.g. viridis) or path to a saved colormap JSON file. Optional if --colors is provided.
OptionShortDefaultDescription
--colors-cList of input colors. Use multiple times or comma-separate.
--width-wterminal widthWidth for preview in characters.
--height-H1Height for preview in lines (minimum: 1).
--space-soklchColor space for interpolation.
--cut0,1Sub-segment of the colormap to use (e.g., 0.2,0.8).
--reverse-rReverse the colormap before previewing.
--steps-nRender this many discrete bands instead of a smooth bar.
--output-oWrite a .png or .svg preview instead of drawing in the terminal.
--hexPrint the hex value of each step under the preview.
--nameSet a display name for the colormap.
Terminal window
palettize show viridis
Terminal window
palettize show --colors "midnightblue,orange,gold"

You can also specify colors separately:

Terminal window
palettize show -c red -c white -c blue
Terminal window
# Wide preview
palettize show viridis --width 120
# Multi-line preview
palettize show viridis --height 5
# Both
palettize show viridis -w 80 -H 3

The --space option controls how colors are interpolated:

Terminal window
# Default: perceptually uniform Oklch
palettize show --colors "blue,yellow" --space oklch
# Standard RGB interpolation
palettize show --colors "blue,yellow" --space srgb
# CIELAB color space
palettize show --colors "blue,yellow" --space lab

The --cut option lets you use only part of a colormap:

Terminal window
# Use only the middle 60% of viridis
palettize show viridis --cut "0.2,0.8"
# Use only the first half
palettize show viridis --cut "0,0.5"
Terminal window
palettize show viridis --reverse
palettize show viridis --steps 7 --hex
palettize show viridis -o preview.png
palettize show my-map.json