I have toolbar icons in a file that are all white with transparent background. Using gimp, how do I change the white to black without affecting the transparency?
General case, any color to any color:
- Click on the "Alpha-lock" icon, which is the small checkerboard icon in the "Lock" line at the top of the Layers list.
- Bucket-fill the layer with the new color (black for you), the alpha lock will ensure that pixels keep they current opacity (this means, without any active selection, to use the bucket-fill with the "Fill whole selection" option.
Faster for your specific case (black to white or white to black):
Another approach is to select all color channels, but un-select the 'alpha' channel in the channels toolbox, then fill with desired color. If you find you do not have an 'alpha' channel, then the mode of the image must not support transparency.