Change one colour to another?

Solution 1:

If you load a GIF image, you likely have a paletted image. Make sure to change it to RGB first with: ImageModeRGB. Changing colors (including resize operations) won't work very well with palettes because Gimp limits its selection of colors to the colors defined in the palette.

I suggest rotating Hue in ColorsHue-Saturation.

Given an initial image like this:

green gradient

You change Hue first by clicking on Master and then dragging the Hue slider and then adjust Brightness and Constrast to your liking.

Adjust Hue in Colors -> Hue-Saturation

The result looks like this:

blue gradient

You can easily make it colder or warmer, darker or lighter, more or less saturated.

Solution 2:

If you are using GIMP 2.8.2, you can simple use Colors -> Map -> Color Exchange.

Source: How can I swap colors with GIMP?