I try to understand how to limit the -trim
command to a specific color. For example,
magick input.png -trim -background yellow +repage output.png
removes yellow. But if the yellow is already removed (e.g., if I run this command twice), it removes red. How it should be fixed? That is, how to make it work that if there is no yellow at image’s edges, the command should not trim anything?