Tools
Prettypretty includes the following command line scripts to show off its features:
python -m prettypretty.grid
Display color grids that visualize the range of terminal colors, while also exercising prettypretty’s support for maximizing contrast and down-sampling colors. By default, this script uses the terminal’s current color theme and makes a best guess as to the terminal’s level of color support. That guess is likely less than accurate when running ssh.
usage: python -m prettypretty.grid [-h] [--macos-terminal | --xterm | --vga]
[--truecolor | --no-truecolor] [--slices]
[--no-label]
options
- -h, --help
show this help message and exit
- --macos-terminal
use the same colors as the Basic theme for macOS Terminal
- --xterm
use the same colors as xterm
- --vga
use the same colors as VGA in text mode
- --truecolor, --no-truecolor
ignore advertised capabilities and force/suppress 24-bit mode
- --slices
show slices through 24-bit RGB cube (in truecolor mode only)
- --no-label
do not display color labels
python -m prettypretty.progress
simulate a progress bar
usage: python -m prettypretty.progress [-h] [--nocolor | --ansi | --eight-bit]
options
- -h, --help
show this help message and exit
- --nocolor
do not use any colors
- --ansi
use at most ANSI colors only
- --eight-bit
use at most 8-bit colors
python -m prettypretty.plot
Plot colors on the chroma/hue plane of Oklab while ignoring their lightness. If the -i/–input option is specified, this script reads newline-separated colors from the named file. If the –vga option is specified, it uses the VGA colors. Otherwise, it uses the terminal’s current ANSI theme colors. This script correctly plots colors irrespective of their color space and the current display gamut. However, since its visualization library (matplotlib) is limited to sRGB, each mark’s color is gamut-mapped to sRGB.
usage: python -m prettypretty.plot [-h] [--silent] [--vga] [-c COLORS]
[-i INPUT] [-o OUTPUT]
options
- -h, --help
show this help message and exit
- --silent
run silently, without printing status updates
- --vga
use VGA colors instead of querying terminal
- -c <colors>, --color <colors>
also plot color written as six hexadecimal digits
- -i <input>, --input <input>
read newline-separated colors from the named file
- -o <output>, --output <output>
write color plot to the named file