In the image above you can see that i selected a blue and a pink color to fill the top space, but the color filled was this gray and red’ish gray color.
The image is probably in indexed mode (Sprite -> Color Mode) which means it will paint whatever color is available in the palette that is the closest to your currently selected color.