Replace Color allows you to exchange a single color in an image with another throughout the current selection:
Make a selection (or select the whole image)
Select Replace Color from the Edit Menu
Choose the Old Color and New Color (default is foreground and background)
Set a Threshold: 0 causes only pixels with exactly the old color to be filled; 255 causes all pixels in the image to be filled. The default is 50 which selects all the old color and close matching pixels.
Set Opacity: 0 is solid color, 50 is half-way to transparent. The default is 100 – a solid fill.
Check Use Difference to make the replacement color vary slightly according to the difference between the selected old color and the other close matching pixels selecting according to Threshold. Clear this checkbox and the replaced pixels will be uniformly new color. An example of how Use Difference works – set the Threshold to 255 and check Use Difference. The image will be entirely replaced by the new color but you can still make out the picture due to the difference in brightness. Without Use Difference, the picture would be blanked out to a single color.