palettize show
The show command renders a colormap preview directly in your terminal using colored block characters.
palettize show [PRESET_NAME] [OPTIONS]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
PRESET_NAME | Name of a preset palette (e.g., viridis). Optional if --colors is provided. |
Options
Section titled “Options”| Option | Short | Default | Description |
|---|---|---|---|
--colors | -c | List of input colors. Use multiple times or comma-separate. | |
--width | -w | terminal width | Width for preview in characters. |
--height | -H | 1 | Height for preview in lines (minimum: 1). |
--space | -s | oklch | Color space for interpolation. |
--cut | 0,1 | Sub-segment of the colormap to use (e.g., 0.2,0.8). | |
--name | Set a display name for the colormap. |
Examples
Section titled “Examples”Show a Built-in Preset
Section titled “Show a Built-in Preset”palettize show viridisShow a Custom Gradient
Section titled “Show a Custom Gradient”palettize show --colors "midnightblue,orange,gold"You can also specify colors separately:
palettize show -c red -c white -c blueAdjust Preview Size
Section titled “Adjust Preview Size”# Wide previewpalettize show viridis --width 120
# Multi-line previewpalettize show viridis --height 5
# Bothpalettize show viridis -w 80 -H 3Use Different Color Spaces
Section titled “Use Different Color Spaces”The --space option controls how colors are interpolated:
# Default: perceptually uniform Oklchpalettize show --colors "blue,yellow" --space oklch
# Standard RGB interpolationpalettize show --colors "blue,yellow" --space srgb
# CIELAB color spacepalettize show --colors "blue,yellow" --space labUse a Sub-segment of a Colormap
Section titled “Use a Sub-segment of a Colormap”The --cut option lets you use only part of a colormap:
# Use only the middle 60% of viridispalettize show viridis --cut "0.2,0.8"
# Use only the first halfpalettize show viridis --cut "0,0.5"