LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ppmchange

Replace specific colors in PPM images

TLDR

Change specific color
$ ppmchange [oldcolor] [newcolor] [input.ppm] > [output.ppm]
copy
Change red to blue
$ ppmchange red blue [input.ppm] > [output.ppm]
copy
Change multiple colors
$ ppmchange [old1] [new1] [old2] [new2] [input.ppm] > [output.ppm]
copy

SYNOPSIS

ppmchange [options] oldcolor newcolor [file]

DESCRIPTION

ppmchange replaces specific colors in PPM images with new colors. Multiple color substitutions can be specified in a single invocation by providing pairs of old and new colors on the command line.By default, only exact color matches are replaced. The -closeness option allows fuzzy matching by specifying a tolerance value, useful when working with images that have slight color variations due to compression or anti-aliasing. Part of the Netpbm toolkit.

PARAMETERS

OLDCOLOR

Color to replace.
NEWCOLOR
Replacement color.
FILE
Input PPM file.
-closeness N
Color matching tolerance.

INSTALL

sudo apt install netpbm
copy
sudo dnf install netpbm
copy
sudo pacman -S netpbm
copy
sudo apk add netpbm
copy
sudo zypper install netpbm
copy
brew install netpbm
copy
nix profile install nixpkgs#netpbm
copy

CAVEATS

Exact color matching by default. Part of Netpbm suite.

HISTORY

ppmchange was created as part of Netpbm for color replacement.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid