Skip to content

CLI Overview

Palettize provides a command-line interface for previewing, checking, and exporting colormaps.

Terminal window
palettize [OPTIONS] COMMAND [ARGS]

These options are available for all commands:

OptionDescription
--version, -VShow the application version and exit
--verbose, -vIncrease output verbosity. Use -vv for more detail
--helpShow help message and exit
CommandDescription
showPreview a colormap in the terminal, or write a PNG or SVG
analyzeCheck lightness, uniformity, and color-vision safety
createExport a colormap, or save it as a reusable JSON file
formatsList export formats and the options each one accepts
list presetsSearch the preset catalog
list categoriesList preset categories
list exportersList export formats (same as formats)
presetsShow one preset’s metadata
infoShow the version, links, and a banner
CodeMeaning
0Success
1Usage error (invalid arguments)
2Invalid color
3Export error
4Resource not found (preset or exporter)
5Unexpected error

When specifying colors via --colors, you can use:

  • Named colors: red, blue, midnightblue, gold
  • Hex colors: #ff0000, #0000ff
  • Comma-separated lists: --colors "red,white,blue" or --colors red --colors white --colors blue

Colors are parsed via the ColorAide library, which supports many formats.

Terminal window
# Show help
palettize --help
# Show version
palettize --version
# Run with verbose output
palettize -v show viridis
# Run with extra verbose output (includes tracebacks on error)
palettize -vv create viridis -f gdal -o output.txt