How to change one color of an image to another?
So that the whole image does not change, you can first select the desired color, and then execute this command.
How to choose the right color.
Mode | Select
Selection | Select colors
Start color | Pick
Specify the desired color in the image
Final color | Pick
Specify the desired color in the image
It will be the same color in your case.
OK
Tools | Color Adjust | RGB
Now only the selected area will change color, no background