Let C1(r1, g1, b1) - color you want to keep. C2(r2, g2, b2) - color you want to change. C3(r3, g3, b3) - replacement color.
Tip #1:
Just use curves. Add Curves layer.
Go to Red channel and place two dots on the curve (Input, Output): (r1,r1) and (r2,r3).
Go to Green channel and place two dots on the curve (Input, Output): (g1,g1) and (g2,g3)
Go to Blue channel and place two dots on the curve (Input, Output): (b1,b1) and (b2,b3)
In each channel try to make the curve segments between points as linear as possible. If you've got steady hand you may try using pencil mode
.
Bad news - you can't use it if either r1 = r1 or g1 = g2 or b1 = b2 or close, but this is mostly not the case
Tip #2:
Try using Blend if options. Create new layer. Fill it with replacement color. Go to Blend if options and for Undelying layer:
Go to Red channel and move both sliders to r2 value.
Go to Green channel and move both sliders to g2 value.
Go to Blue channel and move both sliders to b2 value.
In each channel split the sliders and move left and right semitriangles.
This tip may or may not work well. It just depends.
Tip #3:
Try using Color Correction filter from
theimagingfactory