Why is this color mapping not working?
      
        HI, 
I'm using Gimp 2.8.18 on Mac High Sierra.  I want to do what I hope is
very simple -- switch out one color with another.  I wanted to change
the white to a dark gray and teh black to a lighter gray.  I first
changed the white color, which went ok.  Then, I want to change all
the black to a gray color -- #D3D3D3.  I open my image, go to the
Color menu, and select "Map" and then select "Color Exchange".   Then
I select the relevant colors and click "OK".  However the result
(attached) is disappointing.  It is very difficult to read the numbers
in the scale.  Am I missing something?  Or there others colors at play
here?
Thanks for any advice, - Dave
Not the best way, guessing some sort of selection to choose the background leaving semi-transparent pixels around the text.  A jpeg especially tends to promote artefacts around text.
A better way.
Remove the background using Colour -> Colour-to-Alpha White is default 
Lock the transparent pixels on the layer using the alpha lock in the layers dialogue.
Bucket fill the layer with the d3d3d3 gray.
Add a new layer under and fill with the darker gray.
Something like this is best exported as a png which because of the 2 colours is smaller than a jpeg.
screenshot and xcf is attached. xcf should still have alpha lock in place as example.
rich: www.gimp-forum.net