modpal
version 1.1

Small and quick utility to sort and modify 256 color table (8 bit palette) using various criteria.
Commands can be chained one after another, they will be processesed in series as if the program was started many times.
Possible input file formats are: JASC (.pal), raw RGB data (3*256 bytes), ACT (read as raw).

Arguments:

 <input file> - mandatory (type is detected by extension: .pal is for text files)
 <output file> - mandatory
 [--out-raw] - option to write output file as binary RGB palette
 [--out-act] - option to write output file as Adobe(TM) Color Table (ACT) palette
 [--out-std] - option to write directly to stdout (output name is ignored)
 [reverse <range>] - reverse part of current table
 [sort <range> <mode>] - perform sort on a range of colors
 [mod <range> <component> <operator> <float value>] - perform arithmetic operation on a range of colors

 <> arguments are required, [] are optional.
 range can be defined as "start-end" (no spaces!) or just "all" (same as "0-255").
 component can be one of r|g|b|h|s|l|t, sort mode is actually a color component. t is 
 operator is =|+=|-=|*=|/=.

Exit status:

 0 on success, otherwise an error occurred.

Examples:

 modpal --help
 modpal in.pal out.pal sort 0-255 h reverse mod 0-127 h += 180
 modpal in.pal out.bin --out-raw mod all l *= 2
 modpal in.pal out.act --out-act

Building:

 Based on XDM 3039 code, uses shared source files. Put "modpal" project directory into "XDMSourceCode/utils/".
 NOTE: VS 6.0 project files are experimental and may be outdated.

Author:

 Written by xawari
 Copyright (c) 2018
 Distributed under the terms of Mozilla Public License version 2.0
