Forrest logo
back to the convert tool

convert:ai:4b34c

how do i change colors from black to grey in a png file using convert
$ convert input.png -color-matrix '0.5 0.5 0.5 0 0 0.5 0.5 0.5 0 0 0.5 0.5 0.5 0 0 0 0 0 1 0' output.png
try on your machine

This command uses the -color-matrix option in ImageMagick's convert utility to change the colors in the input.png file from black to grey. The matrix used in the command scales the RGB values to create a grey color.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • how do i change colors from black to grey in a png file using convert?
back to the convert tool