Hi
@jeacukconcaga
Not sure there is an easy solution that would universally work on arbitrary images.
Its also not clear from you request exactly how accurate the colors need to be and that only those very specific areas are corrected.
Note that from you description, there are other areas in the image that lie close to two black lines (around the eyes and toes) that fall into your description.
If your needs were quite flexible and the images quite similar to what you have e.g. similar resolution black outlines needed a specific color fill for the whole image (not matched) and a few extra areas got changed, here is a relatively easy way that could work in a very limited fashion.
0) I worked on a stamped version of the image
1) Make a selection with Select > Color Range set to Shadows and Range of 50
2) Select > Modify > Expand selection by 2 pixels
3) Select > Modify > Contract (Shrink) selection by 2 pixels
4) Create a new empty Layer with Blend set to Darken
5) Fill the selection with a specific color and turn off selection
Attached is a GIF animation showing original and the modified version in 1 second intervals.
I think it got the changes you wanted a a few additional ones that you did not.
So it depends on your specific needs yet wanted to share this example approach
This could pretty easily be put into an Action
John Wheeler