ravikum wrote:thanks for the reply.
But the result I got is almost the same as input.
Also, you have not used the fill color #FCB587 in your code.
I have to do this with many more photos with some hex fill color tint for each photo.
So, please suggest me how to darken the hair after tinting with the hex color.
Thanks
I thought all you wanted was to darken the hair and leave the skin tones alone in the original. But you could do just tint and use the tinted image as input to my code.
So try the following with a higher threshold, since your tinted image is brighter. Change the modulate (80) or threshold as desired. You have to test different values yourself to suit.
convert s2goki.jpg -fill '#FCB587' -colorize 50% \
\( -clone 0 -modulate
80,100,100 \) \
\( -clone 0 -colorspace HSI -separate +channel \) \
\( -clone 4 -threshold
54% -negate \) \
\( -clone 3 -threshold
54% -negate \) \
\( -clone 5 -clone 6 -compose multiply -composite \) \
-delete 2-6 -compose over -composite result.png