For example you have these two images
Your image that you want to change its colors:
And the image where you want to based your image colors:
The output image should be the first but all its pixel colors are all present on the second image.
Any recommended tool or tricks to achieve this?