If you want to color one object in the black and white photograph, follow all the steps that are shown in this example.
Take picture: First we have to capture any black & white picture to modify.
Selection: To make selection of the object that you want to color by the Polygonal lasso tool (U key).
Color balance: Go to Image menu > Adjustment >Apply Color balance.
Adjust levels: Go to Image menu > Adjustment >Apply Levels.
Curves setting: Go to Image menu > Adjustment > Curves.
You will get it.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.