If GIMP has a color index mode, make sure that you're not using that. Always try to do this sort of editing in RGB mode rather than color index mode, because the colors that the system may pick aren't necessarily the ones that you'd pick.