CLI Overview
Palettize provides a command-line interface for generating, previewing, and exporting colormaps.
Basic Usage
Section titled “Basic Usage”palettize [OPTIONS] COMMAND [ARGS]Global Options
Section titled “Global Options”These options are available for all commands:
| Option | Description |
|---|---|
--version, -V | Show the application version and exit |
--verbose, -v | Increase output verbosity. Use -vv for more detail |
--help | Show help message and exit |
Commands
Section titled “Commands”| Command | Description |
|---|---|
show | Render a colormap preview in the terminal |
create | Export a colormap to one or more file formats |
list presets | List all available preset palettes |
list exporters | List all available export formats |
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | Success |
1 | Usage error (invalid arguments) |
2 | Invalid color |
3 | Export error |
4 | Resource not found (preset or exporter) |
5 | Unexpected error |
Color Input Formats
Section titled “Color Input Formats”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.
Examples
Section titled “Examples”# Show helppalettize --help
# Show versionpalettize --version
# Run with verbose outputpalettize -v show viridis
# Run with extra verbose output (includes tracebacks on error)palettize -vv create viridis -f gdal -o output.txt