how can I change the color of an RGB image in Photoshop?

how can I change the color of an RGB image in Photoshop?

So these are the two almost similar colors you's like to swap:



And lets assume they're not the only colors in the image (a visual example would be helpful to rule out any unexpected aspect of your image).

There are many methods one could think of, but I'd try this one:

Select the Magic Wand, set it's Tolerance to 0, and switch off Anti-alias and Contiguous. Also check if the sample size is set to Point. The screen shot is in Dutch, but you'll get the idea:



Now click on any pixel of that grey color. All instances will be selected (the non-Contiguous option will immediately select all similar colors), so you can now use the Edit >; Fill command and dialogue to set the color fill to that off-grey value, while retaining Transparency. Hit OK and presto...



But I wonder which aspect I didn't expect will make this method useless...



Oorspronkelijk geplaatst op Quora: In Photoshop, how can I change the color of an RGB image where every pixel has #838383 and I want them to have #848577? The catch is some of them have transparency."