Reverse the colors in an image using ImageMagick
The negate option in ImageMagick is used to reverse the colors in an image. Essentially, it creates a negative of the image. In a negative image, each color is replaced by its opposite color on the color wheel. For instance, white becomes black, blue becomes orange, green becomes magenta, and so on
convert <input> -channel RGB -negate <output>
The -channel RGB
option ensures that the negation applies only to the color channels, not the alpha channel