I opened a .png file I had in GIMP and started editing it. The image was only black and some transparency. I selected the paint bucket tool, chose white as my color but when I fill in anything it is black.
Turns out the image was somehow using Indexed color mode. The solution was to go to Image > Mode > RGB.