"Now there's an image of the sun coming through this hole again. You can also say that there's a red image of the sun there, a blue image of the sun, a green image of the sun. There's an image of the sun for every frequency that's in the sunlight. If I put a little prism over the pinhole, it shifts the blue image of the sun over quite a ways, and the green a little less.
In other words, you could spread that out into what you call a spectrum, or a rainbow. But what that really is is a whole series of colored images of the sun that normally are all stacked right on top of each other and you see that as white. But if you put the prism there, then-just as if you took a pile of pennies and smeared them sideways - then you can see all the colored images of the sun. Then that's the fun thing, because the sun also makes infrared images, and ultraviolet images, and Xray images. Anything you say about the visible light is true of all radiation. Radiation is information. The information is an image of where the radiation is coming from. Shadows of any kind of radiation are actually complementary images.