I would do it in two steps instead, having the shading as a seperate mask.
Then, you'd just change one color in the original image, then apply the mask.
Batch convert a range of colors in a file
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
You can also preserve the highlights and shading by using the mask to
overlay the color as a 'tint' either using -tint OR the 'overlay' Alpha Compositing method.
See Tint...
http://www.cit.gu.edu.au/~anthony/graph ... olor/#tint
and Overlay
http://www.cit.gu.edu.au/~anthony/graph ... e/#overlay
I use both of these to good effect in the Advanced IM Examples page
against a 3D shaded greyscale shapes.
overlay the color as a 'tint' either using -tint OR the 'overlay' Alpha Compositing method.
See Tint...
http://www.cit.gu.edu.au/~anthony/graph ... olor/#tint
and Overlay
http://www.cit.gu.edu.au/~anthony/graph ... e/#overlay
I use both of these to good effect in the Advanced IM Examples page
against a 3D shaded greyscale shapes.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/