How do you know that sunlight (ordinary "white light") contains the colors of the rainbow? Oh, you say, "Because the light in a rainbow comes from sunlight," or "I can make these colors with a prism."

(This photo was taken from the stern of my trawler, aptly named Rainbow, in 2000.)
But how do you know that the colors of the rainbow are not made by the water drops? Or by the glass in the prism?
Sir Isaac Newton addressed this question long ago, in 1671/72. And why 1671/72? That is another interesting question. (You would need to understand the Julian and Gregorian calendars, and when the change from one to the other was made.)

I once had the opportunity to access Newton's original paper in the rare books vault at the Linda Hall Library in Kansas City, Missouri. I took photographs of each page of this publication and later transcribed the pages into a readable font. However, I changed an old form of the letter s, shaped like the integral sign, ∫in mathematics, to our standard s. The familiar s was used at the end of words, but the other form inside a word. I left Newton's spelling unchanged, which you will find differs from modern words for the same thing. Some words are archaic but still used, and these are interesting to look up in dictionaries.
Artists will find the discussion of color mixing to be of great interest. And it is alsointeresting that these studies were begun in 1666 but delayed because, as Newton said, "Amidst these thoughts I was forced from Cambridge by the Intervening Plague, and it was more than two years, before I proceeded further."
Here is Newton's original publication, and I have included his drawings (modified slightly for clarification).
(3075 ) Numb. 80.
PHILOSOPHICAL TRANSACTIONS.
February 19, 1671/72
A letter of Mr. Isaac Newton, Professor of the Mathematicks in the University of Cambridge; containing his New Theory about Light and Colors: sent by the Author to the Publisher from Cambridge, Febr. 6, 1671/72 in order to be communicated to the R. Society.
SIR,
Comparing the length of this coloured Spectrum with its breadth, I found it about five times greater; a disproportion so extravagant, that it excited me to a more then ordinary curiosity of examining, from whence it might proceed. I could scarce think, that the various Thickness of the glass, or the termination with shadow or darkness, could have any Influence on light to produce such an effect; yet I thought it not amiss, first to examine those circumstances, and so tryed, what would happen by transmitting light through parts of the glass of divers thicknesses, or through holes in the window of divers bignesses, or by setting the Prisme without so, that the light might pass through it, and be refracted before it was terminated by the hole: But I found none of those circumstances material. The fashion of the colours was in all the cases the same.
I then proceeded to examine more critically, what might be effected by the difference of the incidence of Rays coming from divers parts of the Sun; and to that end, measured the several lines and angles, belonging to the image. Its distance from the hole or Prisme was 22 foot; its utmost length 13 1/4 inches; its breadth 2 3/8; the diameter of the hole 1/4 of an inch; the angle, with the Rays, tending towards the middle of the image, made with those lines, in which they would have proceeded without refraction, was 44 deg. 56’. And the vertical Angle of the Prisme, 63 deg. 12’. Also the Refractions on both sides of the Prisme, that is, of the Incident, and Emergent Rays, were as near, as I could make them, equal, and consequently about 54 deg. 4’. And the rays fell perpendicularly upon the wall. Now subducing the diameter of the hole from the length and breadth of the Image, there remains 13 Inches the length, and 2 3/8 the breadth, comprehended by those Rays, which passed through the center of said hole, and consequently the angle of the hole, which that breadth subtended, was about 31’, answerable to the Suns Diameter; but the angle, which its length subtended, was more than five such diameters, namely 2 deg. 49’.
Having made these observations, I first computed from them the refractive power of that glass, and found it measured by the ratio of sines, 20 to 31. And then, by that ratio, I computed the refracions of two Rays flowing from opposite parts of the Sun's discus, so as to differ 31’ in their obliquity of Incidence, and found, that the emergent Rays should have comprehended an angle of about 31’, as they did, before they were incident.
But because this computation was founded on the Hypothesis of the proportionality of the sines of Incidence, and Refraction, which though by my own Experience I could not imagine to be so erroneous, as to make that Angle but 31’, which in reality was 2 deg. 49’; yet my curiosity caused me again to take my Prisme. And having placed it at my window, as before, I observed, that by turning it a little about its axis to and fro, so as to vary its obliquity to the light, more than an angle of 4 or 5 degrees, the Colours were not thereby sensibly translated from their place on the wall, and consequently by that variation of Incidence, the quantity of refraction was not sensibly varied. By this Experiment therefore, as well as by the former computation, it was evident, that the difference of the Incidence of Rays, flowing from divers parts of the Sun, could not make them after decussation divergent at a sensibly greater angle, than that at which they before converged; which being, at most, but about 31 or 32 minutes; there still remained some other cause to be found out, from whence it could be 2 degr. 49.
The gradual removal of these suspicions, at length led me to the Experimentum Crucis, which was this: I took two boards, and placed one of them close behind the Prisme at the window, so that the light might pass through a small hole, made in it for the purpose, and fall on the other board, which I placed at about 12 feet distance, having first made a small hole in it also, for some of that Incident light to pass through. Then I placed another Prisme behind this second board, so that the light, trajected through both the boards, might pass through that also, and be again refracted before it arrived at the wall. This done, I took the first Prisme in my hand, and turned it to and fro slowly about its axis, so much as to make the several parts of the Image, cast on the second board successively pass through the hole in it, that I might observe to what places on the wall the second Prisme would refract them. And I saw by the variation of those places, that the light, tending to that end of the image, towards which the refraction of the first Prisme was made, did in the second Prisme suffer a Refraction considerably greater then the light ending to the other end. And so the true cause of the length of that Image was detected to be no other, then that Light consists of Rays differently refrangible, which, without any respect to a difference in their incidence, were, according to their degrees of refrangibility, transmitted towards divers parts of the wall.

The Doctrine you will find comprehended and illustrated in the following propositions.
3. The species of colour, and degree of Refrangibility proper to any particular sort of Rays, is not mutable by Refraction, nor by Reflection from natural bodies, nor by any other cause, that I could yet observe. When any one sort of Rays hath been well parted from those of other kinds, it hath afterwards obstinately retained its colour, nothwithstanding my utmost endeavours to change it. I have refracted it with Prismes, and reflected it with Bodies, which in Day-light were of other colours; I have intercepted it with the coloured film of Air interceding two compressed plates of glass; transmitted it through coloured Mediums, and through Mediums irradiated with other sorts of Rays, and diversly terminated it; and yet could never produce any new colour out of it. It would by contracting or dilating become more brisk, or faint, and by the loss of many Rays, in some cases very obscure and dark; but I could never see it changed in Specie.
7.But the most surprising and wonderful composition was that of Whiteness. There is no one sort of Rays which alone can exhibit this. 'Tis ever compounded, and to its composition are requisite all the aforsesaid primary Colours, mixed in a due proportion. I have often with Admiration beheld, that all the Colours of the Prisme being made to converge, and thereby to be again mixed as they were in the light before it was Incident upon the Prisme, reproduced light, intirely and perfectly white, and not at all sensibly differing from a direct Light of the Sun, unless when the glasses, I used, were not sufficiently clear; for then they would a little incline it to their colour.
8. Hence therefore it comes to pass, that Whiteness is the usual colour of Light; for, Light is a confused aggregate of Rays indued with all sorts of Colors, as they are promiscuously darted from the various parts of luminous bodies. And of such a confused aggregate, as I said, is generated Whiteness, if there be a due proportion of the Ingredients; but if any one predominate, the Light must incline to that colour; as it happens in the Blew flame of Brimstone; the yellow flame of a candle; and the various colours of Fixed Stars.
10. Why the Colours of the Rainbow appear in falling drops of Rain, is also from hence evident. For those drops, which refract the Rays, disposed to appear purple, in greatest quantity to the Specators eye, refract the Rays of other sorts so much less, as to make them pass beside it; and such are the drops on the inside of the Primary Bow, and on the outside of the Secondary or Exteriour one. So those drops, which refract in greatest plenty the Rays, apt to appear red, toward the Specators eye, refract those of other sorts so much more, as to make them pass beside it; and such are the drops on the exteriour part of the Primary, and interiour part of the Secondary Bow.
11. The odd phænomena of an infusion of Lignum Nephriticum, Leaf Gold, Fragments of coloured glass, and some other transparently coloured bodies, appearing in one position of one colour, and of another in another, are on these grounds no longer riddles. For, those are substances apt to reflect one sort of light and transmit another; as may be seen in a dark room, by illuminating them with similar or uncompounded light. For, then they appear of that colour only, with which they are illuminated, but yet in one position more vivid and luminous than in another, accordingly as they are disposed more or less to reflect or transmit the incident colour.
12. From hence also is manifest the reason of an unexpeced Experiment, which Mr. Hook somewhere in his Micrography relates to have made with two wedg-like transparent vessels, fill'd the one with a red, the other with a blew liquor: namely, that though they were severally transparent enough, yet both together became opake; For, if one transmitted only red, and the other only blew, no rays could pass through both.
13. I might add more instances of this nature, but I shall conclude with this general one, that the Colours of all natural Bodies have no other origin than this, that they are variously qualified to reflect one sort of light in greater plenty than another. And this I have experimented in a dark Room by illuminating those bodies with uncompounded light of divers colours. For by that means any body may be made to appear of any colour. They have there no appropriate colour, but ever appear of the colour of the light cast upon them, but yet with this difference, that they are most brisk and vivid in the light of their own day-light colour. Minium appeareth there of any colour indifferently, with which 'tis illustrated, but yet most luminous in red, and so Bise appeareth indifferently of any colour with which 'tis illustrated, but yet most luminous in blew. And therefore, Minium refleceth Rays of any colour, but most copiously those indued with red; and consequently when illustrated with day-light, that is, with all sorts of Rays promiscuously blended, those qualified with red shall abound most in the reflected light, and by their prevalence cause it to appear of that colour. And for the same reason Bise, reflecting blew most copiously, shall appear blew by the excess of those Rays in its reflected light; and the like of other bodies. And that this is the intire and adequate cause of their colours, is manifest, because they have no power to change or alter the colours of any sort of Rays incident apart, but put on all colours indifferently, with which they are inlightned.
These things being so, it can be no longer disputed, whether there be colours in the dark, nor whether they be the qualities of the objects we see, no nor perhaps, whether Light be a Body. For, since Colours are the qualities of Light, having its Rays for their intire and immediate subject, how can we think those Rays qualities also, unless one quality may be the subject of and sustain another; which in effect is to call it Substance. We should not know Bodies for substances, were it not for their sensible qualities, and the Principal of those being now found due to something else, we have as good reason to believe that to be a Substance also.
Besides, whoever thought any quality to be a heterogeneous aggregate, such as Light is discovered to be. But, to determine more absolutely, what Light is, after what manner refracted, and by what modes or actions it produceth in our minds the Phantasms of Colours, is not so easie. And I shall not mingle conjectures with certainties.
Reviewing what I have written, I see the discourse it self will lead to divers Experiments sufficient for its examination: And therefore I shall not trouble you further, than to describe one of those, which I have already insinuated.

Below is my version of Newton's diagram, retaining key components, but showing what the screen shows in each situation.

If you proceed further to try the impossibility of changing any uncompounded colour (which I have asserted in the third and thirteenth propositions,) 'tis requisite that the Room be made very dark, least any scattering light, mixing with the colour, disturb and allay it, and render it compound, contrary to the design of the Experiment. 'Tis also requisite, that there be a perfecter separation of the Colours, than, after the manner above described, can be made by the Refraction of one single Prisme, and how to make such further separations, will scarce be difficult to them, that consider the discovered laws of Refracions. But if tryal shall be made with colours not throughly separated, there must be allowed changes proportionable to the mixture. Thus if compound Yellow light fall upon Blew Bise, the Bise will not appear perfectly yellow, but rather green, because there are in the yellow mixture many rays indued with green, and Green being less remote from the usual blew colour of Bise than yellow, is the more copiously reflected by it.
In like manner, if any one of the Prismatick colours, suppose Red, be intercepted, on design to try the asserted impossibility of reproducing that Colour out of the others which are pretermitted; 'tis necessary, either that the colours be very well parted before the red is intercepted, or that together with the red the neighbouring colours, into which any red is secretly dispersed, (that is, the yellow, and perhaps green too) be intercepted, or else, that allowance be made for the emerging of so much red out of the yellow green, as may possibly have been diffused, and scatteringly blended in those colours. And if these things be observed, the new Production of Red, or any intercepted colour will be found impossible.