Butterflies are cold-blooded creatures. So when you see a resting butterfly with black on the upperside of its wings, you can be sure it is taking advantage of the fact that black absorbs heat, thus warming its body to help it fly.
Some of the butterflies on this page have black and yellow stripes; some have black or white dots. The familiar Monarch displays patterns of black and orange colors, a warning to predators that it is toxic to them.