GUI.DrawTexture shows texture half transparent and with wrong colors

I never experienced this before so I thought it might be a problem with the newer Unity versions.

When I use GUI.DrawTexture, the texture that shows is about half transparent, and the colors are wrong. It looks like the blue channel is set to 0 (magenta becomes red, light blue becomes green, etc.). This happens even with file formats that don’t support transparency themselves, like BMP. The images all have no transparent pixels and no alpha channel, just a normal image.

Just found the answer. The whole OnGUI function got scrambled by a line drawing script I had going on that used colors other than white.