PMC websites shut down November 13th 2025 unless web hosting fees are paid. See up to date status from PMC Website Hosting and Domain Registration Fee Status forum topic. Please Support PMC to help keep these websites online.

Enjoyed or found this pages content useful, please Support PMC to help me keep this web page online beyond November 13th 2025 when web hosting fees are due.

User Tools

Site Tools


tools:graphicsmagick:color-replace

GraphicsMagick Color Replace

PMC Editing Wiki: Tools GraphicsMagick

2021-12-26

Command is -fill RGB_DESTINATION -opaque RGB_SOURCE.

This example replaces 255,255,255 (white) with 0,0,0 (black):

rem vte_grass
gm convert source.png -fill "rgb(0, 0, 0)" -opaque "rgb(255, 255, 255)" destination.bmp

However if your source image has transparent background and you do -opaque “rgb(0, 0, 0)” it will use the transparent background. GraphicsMagick thinks RGB 0,0,0 is transparent ;)

tools/graphicsmagick/color-replace.txt · Last modified: 2022/04/11 03:06 by snakeman