Command: Palette
Extract a palette from a given image. The palette is saved in either image format (one colour = 1 pixel), common for sites like https://lospec.com, or in a text format, where each line of the file contains one hex encoded RGBA colour (8 hex digits + leading hash)
Usage
Usage: crunch palette [OPTIONS] <INPUT> <OUTPUT>
Arguments:
<INPUT> The path to the image file
<OUTPUT> The path to write the palette data
Options:
-f, --format <FORMAT> The format for the palette file. PNG will output an image with colours, while TXT will output a text file with one hex value per line [default: png] [possible values: txt, png]
-h, --help Print help
-V, --version Print version
Palette Swapping
This command can also generate a template for use with the Swap command by specifying --format columns
. The output will be a PNG
formatted image with a width of 2
, where each row is a unique colour found in the input image.