{"article":{"slug":"the-colors-of-a-soap-film","title":"The colors of a soap film","subtitle":null,"summary":"Aseem Raj Baranwal derives the colors of a draining soap film from first principles: the reflected spectrum of a thin film is a single cosine in 1/λ, so its color is a fixed white minus the cosine transform of the CIE color-matching functions at the extra optical path 2nd, and the computed colors match the table of thicknesses Newton compiled in Opticks.","content_type":"blog_post","language":"en","canonical_url":"https://aseemrb.me/blog/colors-of-a-soap-film/","author":{"name":"Aseem Raj Baranwal","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Aseem Raj Baranwal","url":"https://aseemrb.me/","listing_slug":null,"listing":null},"topics":[{"name":"Physics","slug":"physics","url":"https://listedarticles.com/topics/physics"},{"name":"Optics","slug":"optics","url":"https://listedarticles.com/topics/optics"},{"name":"Mathematics","slug":"mathematics","url":"https://listedarticles.com/topics/mathematics"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":2653,"reading_minutes":12,"published_at":"2026-10-20T09:30:00.000Z","added_at":"2026-10-28T14:19:53.210Z","updated_at":"2026-10-28T14:19:53.210Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/the-colors-of-a-soap-film","markdown_url":"https://listedarticles.com/articles/the-colors-of-a-soap-film.md","example":false,"citation":"Aseem Raj Baranwal, Aseem Raj Baranwal. \"The colors of a soap film.\" 20 Oct 2026. https://aseemrb.me/blog/colors-of-a-soap-film/ (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://aseemrb.me/blog/colors-of-a-soap-film/"},"body_markdown":"*Aseem Raj Baranwal · October 20, 2026*\n\nA soap film is a sheet of water between two layers of soap molecules, often thinner than a micrometer. A vertical film drains under gravity and is thinner at the top, so in white light it shows bands of color ordered by thickness. Newton watched them on bubbles kept under a glass cover ([*Opticks*](https://www.gutenberg.org/ebooks/33504), Book II, Part I, Observation 17): colored rings formed at the top, widened and moved down as the water drained, and a [black spot](https://en.wikipedia.org/wiki/Soap_film#Black_spots) grew at the top before the bubble broke.\n\nThe color at thickness $d$ follows from two ingredients: the fraction of light the film reflects at each wavelength $\\lambda$, and the three [color-matching functions](https://en.wikipedia.org/wiki/CIE_1931_color_space#Color_matching) that the [CIE](https://cie.co.at) (the International Commission on Illumination) uses to reduce a spectrum to a color. The first is a single cosine in $1/\\lambda$, so the color is a fixed white minus the [cosine transform](https://en.wikipedia.org/wiki/Sine_and_cosine_transforms) of the color-matching functions, evaluated at $2nd$, the extra optical path traveled by light reflected from the film’s back surface, where $n$ is the refractive index of water. The computed colors agree with the table of thicknesses that Newton compiled for them.\n\n## The reflected spectrum is a cosine\n\nConsider light of wavelength $\\lambda$ that travels normal to the film, perpendicular to its two surfaces. Two beams return toward the eye. One is reflected by the front surface. The other crosses the film, is reflected by the back surface, and crosses the film again.\n\nLight is an electromagnetic wave: an electric field and a magnetic field that oscillate together as the wave travels. The **amplitude** of a beam is the size of its electric field’s oscillation, and the brightness of the beam is proportional to the square of its amplitude. In the figure, each beam is labeled with its amplitude as a multiple of the incoming beam’s amplitude.\n\nAll the beams in the figure travel along the same line, normal to the film. They are drawn side by side so that each one can be labeled. The right half shows the two returning waves at one instant. The back-surface wave is the front-surface wave turned upside down, and it trails the front-surface wave by a distance $\\tau$, derived below. The light that reaches the eye is the sum of the two waves.\n\n**How much each surface reflects.** When light travels normal to a surface, its electric and magnetic fields both lie parallel to the surface. In a medium of refractive index $n$, the amplitude of the magnetic field is proportional to $n$ times the amplitude of the electric field. Suppose a beam of amplitude $1$ crosses a boundary from a medium of index $n\\_1$ into a medium of index $n\\_2$. It splits into a reflected beam of amplitude $r$ and a transmitted beam of amplitude $t$. [Maxwell’s equations](https://en.wikipedia.org/wiki/Maxwell%27s_equations) require each field to take the same value on both sides of the boundary. For the electric field, this condition reads $1 + r = t$. The reflected beam travels in the opposite direction, so its magnetic field points the opposite way, and the condition for the magnetic field reads $n\\_1(1 - r) = n\\_2\\,t$. Solving these two equations gives the [Fresnel coefficients](https://en.wikipedia.org/wiki/Fresnel_equations#Normal_incidence) for normal incidence,\n\n$$r = \\frac{n\\_1 - n\\_2}{n\\_1 + n\\_2}, \\qquad t = \\frac{2n\\_1}{n\\_1 + n\\_2}.$$\n\nIn the soap film, the index is $1$ for air and $n$ for water. At the front surface, light passes from air into water, so $r = (1-n)/(1+n)$ and $t = 2/(1+n)$. For $n = 1.33$, $r = -0.142$. At the back surface, light passes from water into air. The two indices trade places, and the reflection coefficient becomes $(n-1)/(n+1) = -r$. The two reflections therefore have opposite signs. On its way out, the back-surface beam passes through the front surface from water into air, with transmission coefficient $t' = 2n/(1+n)$. This beam is transmitted, reflected and transmitted again, so it returns with amplitude\n\n$$t\\,(-r)\\,t' \\;=\\; -r\\cdot\\frac{4n}{(1+n)^2} \\;=\\; -r\\,(1 - r^2).$$\n\nThe last step uses $(1+n)^2 - (1-n)^2 = 4n$. For water, $1 - r^2 = 0.98$. From here on I approximate $0.98 \\approx 1$, which changes the back-surface beam’s amplitude by $2\\%$, so the two returning beams have amplitudes $r$ and $-r$.\n\n**How far the second beam trails the first.** The back-surface beam travels an extra distance $2d$ inside the water, where the wavelength shortens to $\\lambda/n$. It therefore falls behind the front-surface beam by $2d/(\\lambda/n) = \\tau/\\lambda$ wavelengths, where\n\n$$\\tau = 2nd$$\n\nis the [optical path difference](https://en.wikipedia.org/wiki/Optical_path_length#Optical_path_difference) between the two beams. In air, where the wavelength is $\\lambda$, this is a distance $\\tau$, as in the figure. Each wavelength of delay is one full cycle of the oscillation, so the back-surface wave is shifted in its cycle by the angle $\\varphi = 2\\pi\\tau/\\lambda$. This angle is called the **phase** difference.\n\nTwo waves with different phases are added by writing each one as a complex number whose magnitude is the amplitude and whose angle is the phase, as in the [Euler’s identity post](https://aseemrb.me/blog/eulers-identity). A shift by the angle $\\varphi$ multiplies the complex number by $e^{i\\varphi}$. The light reflected by the film therefore has amplitude\n\n$$r - r\\,e^{i\\varphi} \\;=\\; r\\,\\big(1 - e^{i\\varphi}\\big), \\qquad \\varphi = \\frac{2\\pi\\tau}{\\lambda}.$$\n\nThe **reflectance** $R$ is the fraction of the incoming light that the film reflects. Brightness is proportional to the square of the amplitude, so $R$ is the squared magnitude of this complex number. Since $|1 - e^{i\\varphi}|^2 = (1 - \\cos\\varphi)^2 + \\sin^2\\varphi = 2 - 2\\cos\\varphi$,\n\n$$R(\\lambda) \\;=\\; 2r^2\\Big(1 - \\cos\\frac{2\\pi\\tau}{\\lambda}\\Big) \\;=\\; 4r^2 \\sin^2\\!\\Big(\\frac{\\pi\\tau}{\\lambda}\\Big).$$\n\nTaking $n = 1.33$ constant across the visible band, $r^2 = 0.0201$, so $R$ lies between $0$ and $4r^2 = 8.0\\%$. In the [**wavenumber**](https://en.wikipedia.org/wiki/Wavenumber) $\\sigma = 1/\\lambda$, $R = 2r^2(1 - \\cos 2\\pi\\sigma\\tau)$ is a single cosine with period $1/\\tau$. Light can also bounce back and forth inside the film several times before it leaves. Summing all of these reflections gives the exact Airy formula (Born and Wolf, §7.6). Its higher harmonics $\\cos(2\\pi k\\sigma\\tau)$, for integers $k \\ge 2$, shrink by a factor $r^2 \\approx 0.02$ from each $k$ to the next, and the two-beam formula stays within about $4\\%$ of it.\n\n## Three numbers from a spectrum\n\nFor the [CIE 1931 **standard observer**](https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_standard_observer), light with spectral power $P(\\lambda)$ is described by three [**tristimulus values**](https://en.wikipedia.org/wiki/CIE_1931_color_space#Computing_XYZ_from_spectral_data)\n\n$$X = \\int P\\,\\bar x\\,d\\lambda, \\qquad Y = \\int P\\,\\bar y\\,d\\lambda, \\qquad Z = \\int P\\,\\bar z\\,d\\lambda,$$\n\nwhere $\\bar x, \\bar y, \\bar z$ are the tabulated color-matching functions. Two lights with the same $(X, Y, Z)$ look identical to the standard observer, and since $\\bar y$ is the eye’s sensitivity to brightness, $Y$ is the [luminance](https://en.wikipedia.org/wiki/Luminance). Light reflected by the film has $P = SR$ for an illuminant with spectrum $S$. I use [D65](https://en.wikipedia.org/wiki/Illuminant_D65), the CIE’s standard representation of average daylight (Newton viewed his bubbles “by Reflexion of the Skies when of a white Colour”), normalized so that a perfect reflector has the [**white point**](https://en.wikipedia.org/wiki/White_point) $W = (0.950,\\ 1,\\ 1.089)$. The [sRGB](https://en.wikipedia.org/wiki/SRGB) standard specifies the $3 \\times 3$ matrix and the encoding curve that take $(X, Y, Z)$ to the color a screen displays.\n\n## The color is a cosine transform\n\nSubstitute $R$ into the three integrals and change variables to $\\sigma = 1/\\lambda$. Define three weight curves on the wavenumber axis by\n\n$$w\\_x(\\sigma)\\,d\\sigma \\;=\\; \\frac{S(\\lambda)\\,\\bar x(\\lambda)\\,d\\lambda}{\\int S\\,\\bar y\\,d\\lambda},$$\n\nand $w\\_y$, $w\\_z$ likewise, so that their integrals are the three components of $W$. With $w = (w\\_x, w\\_y, w\\_z)$, the tristimulus values of the film are\n\n$$\\begin{pmatrix} X \\\\ Y \\\\ Z \\end{pmatrix}\\!(d) \\;=\\; 2r^2\\big(W - \\hat c(\\tau)\\big), \\qquad \\hat c(\\tau) = \\int w(\\sigma)\\cos(2\\pi\\sigma\\tau)\\,d\\sigma, \\qquad \\tau = 2nd.$$\n\nThe vector $\\hat c(\\tau)$ is the cosine transform (the real part of the Fourier transform) of the three weight curves, evaluated at the path difference.\n\n**The black film.** At $d = 0$ the cosine equals $1$ at every wavelength, so $\\hat c(0) = W$ and the film reflects nothing: the two reflections cancel exactly. For small $d$, $R(\\lambda) \\approx 4r^2(\\pi\\tau/\\lambda)^2$ is proportional to $1/\\lambda^2$, so the first light reflected by a thin film is weighted toward short wavelengths. Its [chromaticity](https://en.wikipedia.org/wiki/Chromaticity), in the CIE coordinates $(x, y) = (X, Y)/(X + Y + Z)$, is $(0.266, 0.281)$, bluer than the white point at $(0.313, 0.329)$. This bluish gray is the faint blue that Newton lists right after black. At $d = 10$ nm the film reflects $0.18\\%$ of the light, less than a tenth of the $2\\%$ reflected by a single water surface but not zero, and Newton could see “the Images of some things (as of a Candle or the Sun) very faintly reflected” from the black spot.\n\n**The orders.** The luminance $Y = 2r^2\\big(1 - \\hat c\\_y(\\tau)\\big)$ is smallest when the wavelengths at the center of $w\\_y$ are extinguished, that is, when $\\tau$ is a multiple of $\\bar\\lambda = 554$ nm, the reciprocal of the mean wavenumber of $w\\_y$. The computed minima are at $d = 207$, $416$, $626$ and $837$ nm, spaced by $\\bar\\lambda/2n = 208$ nm. With the middle of the spectrum removed, red and blue light remain, and these purple bands separate the **orders**: the second and third orders run through blue, green, yellow and red, and from the fourth order on, greens and pinks alternate and grow paler.\n\nThe widget evaluates the formula from the CIE tables at $5$ nm steps: the reflectance with the products $S\\bar x$, $S\\bar y$, $S\\bar z$ dashed, the [chromaticity diagram](https://en.wikipedia.org/wiki/CIE_1931_color_space#Chromaticity_diagram) with the film’s path up to the current $d$, and the color for every $d$ up to $2\\ \\mu$m.\n\nfilm thickness *d*\n\n*d* = **250** nm2*nd* = **665** nmcolor\n\nNewton: 2nd-order indigo, 244 nm\n\nreflectance *R*(λ) weights *S*x̄, *S*ȳ, *S*z̄ Newton's table (water)\n\nColors are drawn at 1/(4*r*²) times the true reflectance, so the brightest film shows as full white. The most saturated blues and greens lie outside sRGB and are clipped.\n\nIn the first order the peak of $R$, at $\\lambda = 2\\tau$, moves from the ultraviolet into the visible band. At $d = 104$ nm it sits at $553$ nm, $R$ stays above half its maximum across the band, and the film is white. The zero of $R$ at $\\lambda = \\tau$ enters the band at $d = 143$ nm, which turns the film yellow and then red, and reaches the green at $d = 208$ nm. The chromaticity path goes once around the white point in each of the first three orders. After that, it swings between the green and pink sides of the white point, at a distance that shrinks in every order after the second.\n\n## The colors fade to white\n\nAs $d$ grows, $\\hat c(\\tau) \\to 0$ by the [Riemann–Lebesgue lemma](https://en.wikipedia.org/wiki/Riemann%E2%80%93Lebesgue_lemma) (the Fourier transform of an integrable function tends to zero at infinity), so a thick film reflects the illuminant’s own color at $2r^2 \\approx 4\\%$, the reflectance of two water surfaces whose reflections add without interfering. The cosine in $R$ has period $1/\\tau$ in $\\sigma$, and the visible band holds $\\tau\\,(1/380 - 1/780)\\ \\text{nm}^{-1}$ of its periods: $1.8$ at $d = 0.5\\ \\mu$m and $5.4$ at $d = 1.5\\ \\mu$m. A weight curve that spans several periods averages the cosine to nearly zero.\n\nThe widths of the weight curves set the rate of decay. Replacing $w\\_y$ by a Gaussian with the same mean $\\bar\\sigma = 1/\\bar\\lambda$ and standard deviation $s$ gives\n\n$$\\hat c\\_y(\\tau) \\;\\approx\\; \\cos(2\\pi\\bar\\sigma\\tau)\\; e^{-2\\pi^2 s^2 \\tau^2},$$\n\nthe oscillation that produces the orders, under a Gaussian envelope. For the tabulated D65 and $\\bar y$, $s = 0.136\\ \\mu\\text{m}^{-1}$, and the envelope falls to $1/e$ at $\\tau = 1/(\\sqrt{2}\\,\\pi s) = 1.65\\ \\mu$m, a thickness of $0.62\\ \\mu$m. The modulus of the exact transform of the tabulated curve stays within $0.032$ of this envelope up to $d = 1.2\\ \\mu$m. The transform of a narrower weight curve would decay more slowly. This is the width trade-off of the Fourier transform from the [Heisenberg post](https://aseemrb.me/blog/heisenberg-uncertainty-as-fourier-duality). Computed from the formula, the chromaticity stays within $0.03$ of the white point for every $d \\ge 1.25\\ \\mu$m and within $0.01$ for every $d \\ge 1.61\\ \\mu$m.\n\n## Newton’s table\n\nNewton measured the [rings of color](https://en.wikipedia.org/wiki/Newton%27s_rings) in the thin film of air between two lenses pressed together, and compiled a table of the thickness “at which each Colour is most intense and specifick”, in millionths of an inch, for films of air, water and glass (Book II, Part II). Selected entries of his water column, converted at $25.4$ nm per millionth of an inch, next to the computed color at that thickness:\n\n| order | Newton’s color | Newton (10⁻⁶ in) | $d$ (nm) | computed |\n| --- | --- | --- | --- | --- |\n| 1st | white | 3⅞ | 98 |  |\n| 1st | yellow | 5⅓ | 135 |  |\n| 1st | red | 6¾ | 171 |  |\n| 2nd | violet | 8⅜ | 213 |  |\n| 2nd | blue | 10½ | 267 |  |\n| 2nd | green | 11⅔ | 296 |  |\n| 3rd | purple | 15¾ | 400 |  |\n| 3rd | green | 18⁹⁄₁₀ | 480 |  |\n| 4th | green | 26½ | 673 |  |\n| 7th | ruddy white | 57¾ | 1467 |  |\n\nThe brightest computed film, at $104$ nm, is Newton’s white of the first order at $98$ nm. His violet of the second order, at $213$ nm, sits next to the first luminance minimum at $207$ nm, and his last entry, the **ruddy white** of the seventh order at $1467$ nm, comes out as a pinkish white near the white point.\n\nNewton also viewed the bubble obliquely (Observation 19). At angle $\\theta$ to the normal inside the film the path difference is $2nd\\cos\\theta$, so a color seen at thickness $d$ at normal incidence appears where the film is $d/\\cos\\theta$ thick. [Snell’s law](https://en.wikipedia.org/wiki/Snell%27s_law) gives $\\sin\\theta \\le 1/n$, so the largest factor, at grazing incidence, is $n/\\sqrt{n^2 - 1} = 1.52$ for water. Newton’s ratio for his most oblique view: “By the best of my Observations it was between 15 and 15-1/2 to 10.”\n\n## The Michel-Lévy chart\n\nA plate of a [birefringent](https://en.wikipedia.org/wiki/Birefringence) crystal between crossed [polarizers](https://en.wikipedia.org/wiki/Polarizer), at $45°$ to them, transmits the fraction $\\sin^2(\\pi\\Gamma/\\lambda)$ of the polarized light, where the **retardation** $\\Gamma$ is the optical path difference between the plate’s two polarizations. That is $R/4r^2$ with $\\Gamma = \\tau$, so the strip in the widget is also the [interference color chart](https://en.wikipedia.org/wiki/Interference_colour_chart) that mineralogists use to identify minerals in [thin section](https://en.wikipedia.org/wiki/Thin_section), with $2nd$ as the retardation (for the same illuminant, and with the birefringence taken constant across the band). [Sørensen (2013)](https://doi.org/10.1127/0935-1221/2013/0025-2252) recomputed that chart from first principles.\n\n## References\n\n- Isaac Newton. [*Opticks: or, a Treatise of the Reflections, Refractions, Inflections and Colours of Light*](https://www.gutenberg.org/ebooks/33504). London, 1704. Fourth edition, 1730. Book II, Part I, Observations 17–19 on soap bubbles, and Part II, the table of thicknesses of colored plates.\n- Max Born and Emil Wolf. [*Principles of Optics*](https://doi.org/10.1017/CBO9781139644181), 7th edition. Cambridge University Press, 1999. Chapter 7: two-beam interference in a plane-parallel plate (§7.5) and multiple-beam interference (§7.6).\n- CIE. [*Colour-matching functions of CIE 1931 standard colorimetric observer*](https://doi.org/10.25039/CIE.DS.xvudnb9b). Dataset, 2019, from ISO/CIE 11664-1:2019.\n- CIE. [*CIE standard illuminant D65*](https://doi.org/10.25039/CIE.DS.hjfjmt59). Dataset, 2019, from ISO/CIE 11664-2:2022.\n- IEC 61966-2-1:1999. *Multimedia systems and equipment – Colour measurement and management – Part 2-1: Colour management – Default RGB colour space – sRGB*.\n- Bjørn Eske Sørensen. [*A revised Michel-Lévy interference colour chart based on first-principles calculations*](https://doi.org/10.1127/0935-1221/2013/0025-2252). European Journal of Mineralogy, 25(1):5–10, 2013.\n\n---\n\n*Originally published at [aseemrb.me](https://aseemrb.me/blog/colors-of-a-soap-film/).*\n","body_html":"<p><em>Aseem Raj Baranwal · October 20, 2026</em></p>\n<p>A soap film is a sheet of water between two layers of soap molecules, often thinner than a micrometer. A vertical film drains under gravity and is thinner at the top, so in white light it shows bands of color ordered by thickness. Newton watched them on bubbles kept under a glass cover (<a href=\"https://www.gutenberg.org/ebooks/33504\" rel=\"nofollow ugc noopener\"><em>Opticks</em></a>, Book II, Part I, Observation 17): colored rings formed at the top, widened and moved down as the water drained, and a <a href=\"https://en.wikipedia.org/wiki/Soap_film#Black_spots\" rel=\"nofollow ugc noopener\">black spot</a> grew at the top before the bubble broke.</p>\n<p>The color at thickness $d$ follows from two ingredients: the fraction of light the film reflects at each wavelength $\\lambda$, and the three <a href=\"https://en.wikipedia.org/wiki/CIE_1931_color_space#Color_matching\" rel=\"nofollow ugc noopener\">color-matching functions</a> that the <a href=\"https://cie.co.at\" rel=\"nofollow ugc noopener\">CIE</a> (the International Commission on Illumination) uses to reduce a spectrum to a color. The first is a single cosine in $1/\\lambda$, so the color is a fixed white minus the <a href=\"https://en.wikipedia.org/wiki/Sine_and_cosine_transforms\" rel=\"nofollow ugc noopener\">cosine transform</a> of the color-matching functions, evaluated at $2nd$, the extra optical path traveled by light reflected from the film’s back surface, where $n$ is the refractive index of water. The computed colors agree with the table of thicknesses that Newton compiled for them.</p>\n<h2 id=\"the-reflected-spectrum-is-a-cosine\">The reflected spectrum is a cosine</h2>\n<p>Consider light of wavelength $\\lambda$ that travels normal to the film, perpendicular to its two surfaces. Two beams return toward the eye. One is reflected by the front surface. The other crosses the film, is reflected by the back surface, and crosses the film again.</p>\n<p>Light is an electromagnetic wave: an electric field and a magnetic field that oscillate together as the wave travels. The <strong>amplitude</strong> of a beam is the size of its electric field’s oscillation, and the brightness of the beam is proportional to the square of its amplitude. In the figure, each beam is labeled with its amplitude as a multiple of the incoming beam’s amplitude.</p>\n<p>All the beams in the figure travel along the same line, normal to the film. They are drawn side by side so that each one can be labeled. The right half shows the two returning waves at one instant. The back-surface wave is the front-surface wave turned upside down, and it trails the front-surface wave by a distance $\\tau$, derived below. The light that reaches the eye is the sum of the two waves.</p>\n<p><strong>How much each surface reflects.</strong> When light travels normal to a surface, its electric and magnetic fields both lie parallel to the surface. In a medium of refractive index $n$, the amplitude of the magnetic field is proportional to $n$ times the amplitude of the electric field. Suppose a beam of amplitude $1$ crosses a boundary from a medium of index $n_1$ into a medium of index $n_2$. It splits into a reflected beam of amplitude $r$ and a transmitted beam of amplitude $t$. <a href=\"https://en.wikipedia.org/wiki/Maxwell%27s_equations\" rel=\"nofollow ugc noopener\">Maxwell’s equations</a> require each field to take the same value on both sides of the boundary. For the electric field, this condition reads $1 + r = t$. The reflected beam travels in the opposite direction, so its magnetic field points the opposite way, and the condition for the magnetic field reads $n_1(1 - r) = n_2\\,t$. Solving these two equations gives the <a href=\"https://en.wikipedia.org/wiki/Fresnel_equations#Normal_incidence\" rel=\"nofollow ugc noopener\">Fresnel coefficients</a> for normal incidence,</p>\n<p>$$r = \\frac{n_1 - n_2}{n_1 + n_2}, \\qquad t = \\frac{2n_1}{n_1 + n_2}.$$</p>\n<p>In the soap film, the index is $1$ for air and $n$ for water. At the front surface, light passes from air into water, so $r = (1-n)/(1+n)$ and $t = 2/(1+n)$. For $n = 1.33$, $r = -0.142$. At the back surface, light passes from water into air. The two indices trade places, and the reflection coefficient becomes $(n-1)/(n+1) = -r$. The two reflections therefore have opposite signs. On its way out, the back-surface beam passes through the front surface from water into air, with transmission coefficient $t&#39; = 2n/(1+n)$. This beam is transmitted, reflected and transmitted again, so it returns with amplitude</p>\n<p>$$t\\,(-r)\\,t&#39; \\;=\\; -r\\cdot\\frac{4n}{(1+n)^2} \\;=\\; -r\\,(1 - r^2).$$</p>\n<p>The last step uses $(1+n)^2 - (1-n)^2 = 4n$. For water, $1 - r^2 = 0.98$. From here on I approximate $0.98 \\approx 1$, which changes the back-surface beam’s amplitude by $2\\%$, so the two returning beams have amplitudes $r$ and $-r$.</p>\n<p><strong>How far the second beam trails the first.</strong> The back-surface beam travels an extra distance $2d$ inside the water, where the wavelength shortens to $\\lambda/n$. It therefore falls behind the front-surface beam by $2d/(\\lambda/n) = \\tau/\\lambda$ wavelengths, where</p>\n<p>$$\\tau = 2nd$$</p>\n<p>is the <a href=\"https://en.wikipedia.org/wiki/Optical_path_length#Optical_path_difference\" rel=\"nofollow ugc noopener\">optical path difference</a> between the two beams. In air, where the wavelength is $\\lambda$, this is a distance $\\tau$, as in the figure. Each wavelength of delay is one full cycle of the oscillation, so the back-surface wave is shifted in its cycle by the angle $\\varphi = 2\\pi\\tau/\\lambda$. This angle is called the <strong>phase</strong> difference.</p>\n<p>Two waves with different phases are added by writing each one as a complex number whose magnitude is the amplitude and whose angle is the phase, as in the <a href=\"https://aseemrb.me/blog/eulers-identity\" rel=\"nofollow ugc noopener\">Euler’s identity post</a>. A shift by the angle $\\varphi$ multiplies the complex number by $e^{i\\varphi}$. The light reflected by the film therefore has amplitude</p>\n<p>$$r - r\\,e^{i\\varphi} \\;=\\; r\\,\\big(1 - e^{i\\varphi}\\big), \\qquad \\varphi = \\frac{2\\pi\\tau}{\\lambda}.$$</p>\n<p>The <strong>reflectance</strong> $R$ is the fraction of the incoming light that the film reflects. Brightness is proportional to the square of the amplitude, so $R$ is the squared magnitude of this complex number. Since $|1 - e^{i\\varphi}|^2 = (1 - \\cos\\varphi)^2 + \\sin^2\\varphi = 2 - 2\\cos\\varphi$,</p>\n<p>$$R(\\lambda) \\;=\\; 2r^2\\Big(1 - \\cos\\frac{2\\pi\\tau}{\\lambda}\\Big) \\;=\\; 4r^2 \\sin^2!\\Big(\\frac{\\pi\\tau}{\\lambda}\\Big).$$</p>\n<p>Taking $n = 1.33$ constant across the visible band, $r^2 = 0.0201$, so $R$ lies between $0$ and $4r^2 = 8.0\\%$. In the <a href=\"https://en.wikipedia.org/wiki/Wavenumber\" rel=\"nofollow ugc noopener\"><strong>wavenumber</strong></a> $\\sigma = 1/\\lambda$, $R = 2r^2(1 - \\cos 2\\pi\\sigma\\tau)$ is a single cosine with period $1/\\tau$. Light can also bounce back and forth inside the film several times before it leaves. Summing all of these reflections gives the exact Airy formula (Born and Wolf, §7.6). Its higher harmonics $\\cos(2\\pi k\\sigma\\tau)$, for integers $k \\ge 2$, shrink by a factor $r^2 \\approx 0.02$ from each $k$ to the next, and the two-beam formula stays within about $4\\%$ of it.</p>\n<h2 id=\"three-numbers-from-a-spectrum\">Three numbers from a spectrum</h2>\n<p>For the <a href=\"https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_standard_observer\" rel=\"nofollow ugc noopener\">CIE 1931 <strong>standard observer</strong></a>, light with spectral power $P(\\lambda)$ is described by three <a href=\"https://en.wikipedia.org/wiki/CIE_1931_color_space#Computing_XYZ_from_spectral_data\" rel=\"nofollow ugc noopener\"><strong>tristimulus values</strong></a></p>\n<p>$$X = \\int P\\,\\bar x\\,d\\lambda, \\qquad Y = \\int P\\,\\bar y\\,d\\lambda, \\qquad Z = \\int P\\,\\bar z\\,d\\lambda,$$</p>\n<p>where $\\bar x, \\bar y, \\bar z$ are the tabulated color-matching functions. Two lights with the same $(X, Y, Z)$ look identical to the standard observer, and since $\\bar y$ is the eye’s sensitivity to brightness, $Y$ is the <a href=\"https://en.wikipedia.org/wiki/Luminance\" rel=\"nofollow ugc noopener\">luminance</a>. Light reflected by the film has $P = SR$ for an illuminant with spectrum $S$. I use <a href=\"https://en.wikipedia.org/wiki/Illuminant_D65\" rel=\"nofollow ugc noopener\">D65</a>, the CIE’s standard representation of average daylight (Newton viewed his bubbles “by Reflexion of the Skies when of a white Colour”), normalized so that a perfect reflector has the <a href=\"https://en.wikipedia.org/wiki/White_point\" rel=\"nofollow ugc noopener\"><strong>white point</strong></a> $W = (0.950,\\ 1,\\ 1.089)$. The <a href=\"https://en.wikipedia.org/wiki/SRGB\" rel=\"nofollow ugc noopener\">sRGB</a> standard specifies the $3 \\times 3$ matrix and the encoding curve that take $(X, Y, Z)$ to the color a screen displays.</p>\n<h2 id=\"the-color-is-a-cosine-transform\">The color is a cosine transform</h2>\n<p>Substitute $R$ into the three integrals and change variables to $\\sigma = 1/\\lambda$. Define three weight curves on the wavenumber axis by</p>\n<p>$$w_x(\\sigma)\\,d\\sigma \\;=\\; \\frac{S(\\lambda)\\,\\bar x(\\lambda)\\,d\\lambda}{\\int S\\,\\bar y\\,d\\lambda},$$</p>\n<p>and $w_y$, $w_z$ likewise, so that their integrals are the three components of $W$. With $w = (w_x, w_y, w_z)$, the tristimulus values of the film are</p>\n<p>$$\\begin{pmatrix} X \\ Y \\ Z \\end{pmatrix}!(d) \\;=\\; 2r^2\\big(W - \\hat c(\\tau)\\big), \\qquad \\hat c(\\tau) = \\int w(\\sigma)\\cos(2\\pi\\sigma\\tau)\\,d\\sigma, \\qquad \\tau = 2nd.$$</p>\n<p>The vector $\\hat c(\\tau)$ is the cosine transform (the real part of the Fourier transform) of the three weight curves, evaluated at the path difference.</p>\n<p><strong>The black film.</strong> At $d = 0$ the cosine equals $1$ at every wavelength, so $\\hat c(0) = W$ and the film reflects nothing: the two reflections cancel exactly. For small $d$, $R(\\lambda) \\approx 4r^2(\\pi\\tau/\\lambda)^2$ is proportional to $1/\\lambda^2$, so the first light reflected by a thin film is weighted toward short wavelengths. Its <a href=\"https://en.wikipedia.org/wiki/Chromaticity\" rel=\"nofollow ugc noopener\">chromaticity</a>, in the CIE coordinates $(x, y) = (X, Y)/(X + Y + Z)$, is $(0.266, 0.281)$, bluer than the white point at $(0.313, 0.329)$. This bluish gray is the faint blue that Newton lists right after black. At $d = 10$ nm the film reflects $0.18\\%$ of the light, less than a tenth of the $2\\%$ reflected by a single water surface but not zero, and Newton could see “the Images of some things (as of a Candle or the Sun) very faintly reflected” from the black spot.</p>\n<p><strong>The orders.</strong> The luminance $Y = 2r^2\\big(1 - \\hat c_y(\\tau)\\big)$ is smallest when the wavelengths at the center of $w_y$ are extinguished, that is, when $\\tau$ is a multiple of $\\bar\\lambda = 554$ nm, the reciprocal of the mean wavenumber of $w_y$. The computed minima are at $d = 207$, $416$, $626$ and $837$ nm, spaced by $\\bar\\lambda/2n = 208$ nm. With the middle of the spectrum removed, red and blue light remain, and these purple bands separate the <strong>orders</strong>: the second and third orders run through blue, green, yellow and red, and from the fourth order on, greens and pinks alternate and grow paler.</p>\n<p>The widget evaluates the formula from the CIE tables at $5$ nm steps: the reflectance with the products $S\\bar x$, $S\\bar y$, $S\\bar z$ dashed, the <a href=\"https://en.wikipedia.org/wiki/CIE_1931_color_space#Chromaticity_diagram\" rel=\"nofollow ugc noopener\">chromaticity diagram</a> with the film’s path up to the current $d$, and the color for every $d$ up to $2\\ \\mu$m.</p>\n<p>film thickness *d*</p>\n<p>*d* = <strong>250</strong> nm2<em>nd</em> = <strong>665</strong> nmcolor</p>\n<p>Newton: 2nd-order indigo, 244 nm</p>\n<p>reflectance *R*(λ) weights *S*x̄, *S*ȳ, *S*z̄ Newton&#39;s table (water)</p>\n<p>Colors are drawn at 1/(4*r*²) times the true reflectance, so the brightest film shows as full white. The most saturated blues and greens lie outside sRGB and are clipped.</p>\n<p>In the first order the peak of $R$, at $\\lambda = 2\\tau$, moves from the ultraviolet into the visible band. At $d = 104$ nm it sits at $553$ nm, $R$ stays above half its maximum across the band, and the film is white. The zero of $R$ at $\\lambda = \\tau$ enters the band at $d = 143$ nm, which turns the film yellow and then red, and reaches the green at $d = 208$ nm. The chromaticity path goes once around the white point in each of the first three orders. After that, it swings between the green and pink sides of the white point, at a distance that shrinks in every order after the second.</p>\n<h2 id=\"the-colors-fade-to-white\">The colors fade to white</h2>\n<p>As $d$ grows, $\\hat c(\\tau) \\to 0$ by the <a href=\"https://en.wikipedia.org/wiki/Riemann%E2%80%93Lebesgue_lemma\" rel=\"nofollow ugc noopener\">Riemann–Lebesgue lemma</a> (the Fourier transform of an integrable function tends to zero at infinity), so a thick film reflects the illuminant’s own color at $2r^2 \\approx 4\\%$, the reflectance of two water surfaces whose reflections add without interfering. The cosine in $R$ has period $1/\\tau$ in $\\sigma$, and the visible band holds $\\tau\\,(1/380 - 1/780)\\ \\text{nm}^{-1}$ of its periods: $1.8$ at $d = 0.5\\ \\mu$m and $5.4$ at $d = 1.5\\ \\mu$m. A weight curve that spans several periods averages the cosine to nearly zero.</p>\n<p>The widths of the weight curves set the rate of decay. Replacing $w_y$ by a Gaussian with the same mean $\\bar\\sigma = 1/\\bar\\lambda$ and standard deviation $s$ gives</p>\n<p>$$\\hat c_y(\\tau) \\;\\approx\\; \\cos(2\\pi\\bar\\sigma\\tau)\\; e^{-2\\pi^2 s^2 \\tau^2},$$</p>\n<p>the oscillation that produces the orders, under a Gaussian envelope. For the tabulated D65 and $\\bar y$, $s = 0.136\\ \\mu\\text{m}^{-1}$, and the envelope falls to $1/e$ at $\\tau = 1/(\\sqrt{2}\\,\\pi s) = 1.65\\ \\mu$m, a thickness of $0.62\\ \\mu$m. The modulus of the exact transform of the tabulated curve stays within $0.032$ of this envelope up to $d = 1.2\\ \\mu$m. The transform of a narrower weight curve would decay more slowly. This is the width trade-off of the Fourier transform from the <a href=\"https://aseemrb.me/blog/heisenberg-uncertainty-as-fourier-duality\" rel=\"nofollow ugc noopener\">Heisenberg post</a>. Computed from the formula, the chromaticity stays within $0.03$ of the white point for every $d \\ge 1.25\\ \\mu$m and within $0.01$ for every $d \\ge 1.61\\ \\mu$m.</p>\n<h2 id=\"newton-s-table\">Newton’s table</h2>\n<p>Newton measured the <a href=\"https://en.wikipedia.org/wiki/Newton%27s_rings\" rel=\"nofollow ugc noopener\">rings of color</a> in the thin film of air between two lenses pressed together, and compiled a table of the thickness “at which each Colour is most intense and specifick”, in millionths of an inch, for films of air, water and glass (Book II, Part II). Selected entries of his water column, converted at $25.4$ nm per millionth of an inch, next to the computed color at that thickness:</p>\n<div class=\"table-wrap\"><table><thead><tr><th>order</th><th>Newton’s color</th><th>Newton (10⁻⁶ in)</th><th>$d$ (nm)</th><th>computed</th></tr></thead><tbody><tr><td>1st</td><td>white</td><td>3⅞</td><td>98</td><td></td></tr><tr><td>1st</td><td>yellow</td><td>5⅓</td><td>135</td><td></td></tr><tr><td>1st</td><td>red</td><td>6¾</td><td>171</td><td></td></tr><tr><td>2nd</td><td>violet</td><td>8⅜</td><td>213</td><td></td></tr><tr><td>2nd</td><td>blue</td><td>10½</td><td>267</td><td></td></tr><tr><td>2nd</td><td>green</td><td>11⅔</td><td>296</td><td></td></tr><tr><td>3rd</td><td>purple</td><td>15¾</td><td>400</td><td></td></tr><tr><td>3rd</td><td>green</td><td>18⁹⁄₁₀</td><td>480</td><td></td></tr><tr><td>4th</td><td>green</td><td>26½</td><td>673</td><td></td></tr><tr><td>7th</td><td>ruddy white</td><td>57¾</td><td>1467</td><td></td></tr></tbody></table></div>\n<p>The brightest computed film, at $104$ nm, is Newton’s white of the first order at $98$ nm. His violet of the second order, at $213$ nm, sits next to the first luminance minimum at $207$ nm, and his last entry, the <strong>ruddy white</strong> of the seventh order at $1467$ nm, comes out as a pinkish white near the white point.</p>\n<p>Newton also viewed the bubble obliquely (Observation 19). At angle $\\theta$ to the normal inside the film the path difference is $2nd\\cos\\theta$, so a color seen at thickness $d$ at normal incidence appears where the film is $d/\\cos\\theta$ thick. <a href=\"https://en.wikipedia.org/wiki/Snell%27s_law\" rel=\"nofollow ugc noopener\">Snell’s law</a> gives $\\sin\\theta \\le 1/n$, so the largest factor, at grazing incidence, is $n/\\sqrt{n^2 - 1} = 1.52$ for water. Newton’s ratio for his most oblique view: “By the best of my Observations it was between 15 and 15-1/2 to 10.”</p>\n<h2 id=\"the-michel-levy-chart\">The Michel-Lévy chart</h2>\n<p>A plate of a <a href=\"https://en.wikipedia.org/wiki/Birefringence\" rel=\"nofollow ugc noopener\">birefringent</a> crystal between crossed <a href=\"https://en.wikipedia.org/wiki/Polarizer\" rel=\"nofollow ugc noopener\">polarizers</a>, at $45°$ to them, transmits the fraction $\\sin^2(\\pi\\Gamma/\\lambda)$ of the polarized light, where the <strong>retardation</strong> $\\Gamma$ is the optical path difference between the plate’s two polarizations. That is $R/4r^2$ with $\\Gamma = \\tau$, so the strip in the widget is also the <a href=\"https://en.wikipedia.org/wiki/Interference_colour_chart\" rel=\"nofollow ugc noopener\">interference color chart</a> that mineralogists use to identify minerals in <a href=\"https://en.wikipedia.org/wiki/Thin_section\" rel=\"nofollow ugc noopener\">thin section</a>, with $2nd$ as the retardation (for the same illuminant, and with the birefringence taken constant across the band). <a href=\"https://doi.org/10.1127/0935-1221/2013/0025-2252\" rel=\"nofollow ugc noopener\">Sørensen (2013)</a> recomputed that chart from first principles.</p>\n<h2 id=\"references\">References</h2>\n<ul><li>Isaac Newton. <a href=\"https://www.gutenberg.org/ebooks/33504\" rel=\"nofollow ugc noopener\"><em>Opticks: or, a Treatise of the Reflections, Refractions, Inflections and Colours of Light</em></a>. London, 1704. Fourth edition, 1730. Book II, Part I, Observations 17–19 on soap bubbles, and Part II, the table of thicknesses of colored plates.</li><li>Max Born and Emil Wolf. <a href=\"https://doi.org/10.1017/CBO9781139644181\" rel=\"nofollow ugc noopener\"><em>Principles of Optics</em></a>, 7th edition. Cambridge University Press, 1999. Chapter 7: two-beam interference in a plane-parallel plate (§7.5) and multiple-beam interference (§7.6).</li><li>CIE. <a href=\"https://doi.org/10.25039/CIE.DS.xvudnb9b\" rel=\"nofollow ugc noopener\"><em>Colour-matching functions of CIE 1931 standard colorimetric observer</em></a>. Dataset, 2019, from ISO/CIE 11664-1:2019.</li><li>CIE. <a href=\"https://doi.org/10.25039/CIE.DS.hjfjmt59\" rel=\"nofollow ugc noopener\"><em>CIE standard illuminant D65</em></a>. Dataset, 2019, from ISO/CIE 11664-2:2022.</li><li>IEC 61966-2-1:1999. <em>Multimedia systems and equipment – Colour measurement and management – Part 2-1: Colour management – Default RGB colour space – sRGB</em>.</li><li>Bjørn Eske Sørensen. <a href=\"https://doi.org/10.1127/0935-1221/2013/0025-2252\" rel=\"nofollow ugc noopener\"><em>A revised Michel-Lévy interference colour chart based on first-principles calculations</em></a>. European Journal of Mineralogy, 25(1):5–10, 2013.</li></ul>\n<hr />\n<p><em>Originally published at <a href=\"https://aseemrb.me/blog/colors-of-a-soap-film/\" rel=\"nofollow ugc noopener\">aseemrb.me</a>.</em></p>","headings":[{"level":2,"text":"The reflected spectrum is a cosine","id":"the-reflected-spectrum-is-a-cosine"},{"level":2,"text":"Three numbers from a spectrum","id":"three-numbers-from-a-spectrum"},{"level":2,"text":"The color is a cosine transform","id":"the-color-is-a-cosine-transform"},{"level":2,"text":"The colors fade to white","id":"the-colors-fade-to-white"},{"level":2,"text":"Newton’s table","id":"newton-s-table"},{"level":2,"text":"The Michel-Lévy chart","id":"the-michel-levy-chart"},{"level":2,"text":"References","id":"references"}]}}