I have a photo of a paint tin and a list of images with reference colors for the color of the paint to be adjusted to.

How can this be done? Can it be automated to be done in batch?

paint can

  • It's unclear, at least to me, which way you are trying to match. Are you trying to change the other images to match the single image, or are you trying to produce multiple versions of the single image to match each of the multiple reference shots? Could you provide some examples? – Michael C Aug 28 '18 at 16:33
  • I'm trying to produce multiple colored versions of the single image of the paint tin to match the reference colors! – Konstantin Aug 28 '18 at 17:34
  • When you adjust the color, ALL pixels will get changed. What looks to you like a single color of paint is actually a continuum of colors “near” the paint color. What you are really looking to do, I believe, is mask an area, desaturate it to grayscale and then produce copies with the grayscale parts colorized in a variety of colors, while leaving the rest of the image alone. You might e able to do this with ImageMagick, but I don’t know for sure. It would help if you would post a sample image. – Jim Garrison Aug 29 '18 at 6:56
  • I added a sample picture of the colored paint in the tin to my post! So I basically need a round selection that is being colorized in the colors of the reference chart. I thought I might be able to do this with photoshop actions, but until now I haven't found a working solucion yet! – Konstantin Aug 29 '18 at 13:35
  • What non working solutions have you found? Can you explain what you have tried? – Saaru Lindestøkke Aug 29 '18 at 17:01

What you want to do can be done with ImageMagick. You will need to use an image editor, such as Photoshop or GIMP, to create the following two images:

  • One to mask out the paint contained in the paint can.

  • Another to reproduce the shadows from the paint can onto the paint.

The image of the paint can, the paint mask, the shadows, and the color swatches can then be composed to produce a variation of the image with a different color. Use the image editor to figure out what order and blending modes to use for the layers.

Then you can call ImageMagick in a loop to reproduce the results for each of the desired color swatches. (See ImageMagick v6 Examples: Compositing Images.)

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.