For example this image has two colors: black and white.. I would transform black to red.. to green.. to... another color


Thanks!! (sorry my english)
The easiest way to change from black and white to any other colors is to use Anthony's new +level-colors, for example:kali wrote:I wolud fill - dinamically - another color at the place of a specific color... In other words I want use the "fill" tool of common grapfhic programs using imagemagick.
For example this image has two colors: black and white.. I would transform black to red.. to green.. to... another color
Thanks!! (sorry my english)
rmagick wrote:Use the -opaque option. Here's an example. http://www.imagemagick.org/Usage/color/#opaque
Code: Select all
convert cow.jpg +level-colors red, cow_red.jpg