Skip to main content
Sandbox Physics

Optics 043 · Interference, coherence, cavities, and metrology

Thin-Film Color Studio

Why does a thin film reflect color, and why does the color shift when you tilt it? Light reflected from the top and bottom of each layer interferes. Thickness, refractive index and angle set the delay between those reflections, so some wavelengths come back reinforced and others cancel, and the reflection takes on a color. Tilting shortens the delay and makes the two polarizations reflect differently, so the color shifts.

Edit a single layer or a repeated bilayer stack in a cutaway with magnified depth. Coherent transfer matrices for s and p light give the fixed-exposure D65 colour, the full power spectrum and a map of reflection versus angle and wavelength.

Interactive modelThin-Film Color Studio
Shared wavelength / reflected and transmitted power λp,Rp,Tp\lambda_p,R_p,T_p0.500.50
D65 luminance fractions / first-layer round-trip phase YR,YT,δHY_R,Y_T,\delta_H50%50\%
Actual layer count / total thickness / spectral energy-conservation error Nℓ,D,εEN_\ell,D,\varepsilon_E0.00π0.00\pi
Model regimevalid model regime\text{valid model regime}

Physics tutorial

Audit the physics of Thin-Film Color Studio

BackgroundA transparent film reflects some light at each of its boundaries. A wave that crosses a layer and comes back picks up the round-trip phase δj=4πnjdjcos⁡θjλ\delta_j=\frac{4\pi n_jd_j\cos\theta_j}{\lambda}. The signs of the interface reflections matter. A flat soap film with air on both sides turns dark in reflection as its thickness goes to zero, while the transmitted light stays bright. This Lab matches the fields at every boundary, which accounts for all the internal bounces, instead of adding two rays without signs.

Why it mattersWhy does a thin film reflect color, and why does the color shift when you tilt it?

Start with the essentials

Focus question
Why does a thin film reflect color, and why does the color shift when you tilt it?
One-sentence intuition
A lossless coating only divides the light between two exits: R(λ)+T(λ)=1R(\lambda)+T(\lambda)=1. An anti-reflection coating does not absorb light. An exact quarter-wave matching layer cancels reflection at one design wavelength at normal incidence, not across the whole visible spectrum. Repeated pairs of high- and low-index layers instead create a reflection band. Tilting the beam changes the optical phase and separates s from p.

Core mathematical model

Snell geometry and layer phase

njsin⁡θj=sin⁡θ0,βj=2πnjdjcos⁡θjλ,δj=2βjn_j\sin\theta_j=\sin\theta_0,\qquad\beta_j=\frac{2\pi n_jd_j\cos\theta_j}{\lambda},\qquad\delta_j=2\beta_j

The angle is measured from the normal. When phases are compared on a common outgoing wavefront, the cosine factor sets the relative phase; the longer zigzag path inside the layer does not set it alone. The indices are fixed real numbers, and changing an index leaves the thickness unchanged.

Tangential-field characteristic matrix

Mj=(cos⁡βj−isin⁡βj/qj−iqjsin⁡βjcos⁡βj),qj(s)=njcos⁡θj,qj(p)=nj/cos⁡θjM_j=\begin{pmatrix}\cos\beta_j&-i\sin\beta_j/q_j\\-iq_j\sin\beta_j&\cos\beta_j\end{pmatrix},\quad q_j^{(s)}=n_j\cos\theta_j,\quad q_j^{(p)}=n_j/\cos\theta_j

With the harmonic time dependence written with a negative exponent, the matrix takes the tangential electric and magnetic fields at the back of a layer to the fields at its front. Multiply the matrices in physical order, front to back. For p polarization, the tangential-amplitude convention gives the opposite sign from a full-vector convention; the reflectance is the same.

Reflected and transmitted power, computed separately

M=∏jMj,B=M11+qsM12,C=M21+qsM22r=q0B−Cq0B+C,t=2q0q0B+CR=∣r∣2,T=qsq0∣t∣2,Ru=Rs+Rp2\begin{aligned}M&=\prod_jM_j,\quad B=M_{11}+q_sM_{12},\quad C=M_{21}+q_sM_{22}\\r&=\frac{q_0B-C}{q_0B+C},\quad t=\frac{2q_0}{q_0B+C}\\R&=|r|^2,\quad T=\frac{q_s}{q_0}|t|^2,\quad R_u=\frac{R_s+R_p}{2}\end{aligned}

Transmittance includes the factor for energy flux along the normal. It is computed from the transmitted amplitude, not set to one minus the reflectance. For unpolarized light, average the powers, not the complex amplitudes. The subscript on the substrate admittance does not mean s polarization.

Perfect cancellation at one design point

n1=n0ns,d1=λ04n1,R(λ0,0)=0n_1=\sqrt{n_0n_s},\qquad d_1=\frac{\lambda_0}{4n_1},\qquad R(\lambda_0,0)=0

The preset asks for these ideal values. Because the sliders move in finite steps, a residual reflection remains, smaller than the displayed precision. The exact mathematical design is checked separately. Move the wavelength, angle, index or thickness away from the design and reflection comes back.

Spectrum to colour at fixed exposure

(X,Y,Z)=∫360830SD65(λ)R(λ)(xˉ,yˉ,zˉ) dλ∫360830SD65(λ)yˉ(λ) dλ(X,Y,Z)=\frac{\int_{360}^{830}S_{D65}(\lambda)R(\lambda)(\bar x,\bar y,\bar z)\,d\lambda}{\int_{360}^{830}S_{D65}(\lambda)\bar y(\lambda)\,d\lambda}

The official CIE 1931 two-degree colour-matching functions and the D65 data are sampled every 1 nm and integrated with the trapezoidal rule. The same calculation with transmittance gives the transmitted patch. XYZ is converted to linear sRGB, clipped to the display gamut and encoded. No spectrum is rescaled to its brightest point. The specimen is drawn as an unlit colour patch; reflections of a surrounding scene are not physically rendered.

Common difficulties

A rainbow surface is not a thin-film calculation

Typical misconceptionAny iridescent material shader correctly simulates soap bubbles and every optical coating.

Better mental modelColours have to come from a solved spectrum, an illuminant and an observer. In this model the substrate is semi-infinite, the layers are flat and lossless, and you can edit only a single layer or a stack of identical repeated bilayers. Bubble curvature, thickness that varies across a flowing film, absorption, material dispersion and arbitrary layer-by-layer designs would need further models.

Run the experiment

  1. 01

    Scene 1: Flat soap film in air

    Set the soap-film thickness to zero, then raise it. The drawn cross-section really thickens, and the colours come from the spectrum, not from an animation over time.

    What to observe: As the soap film thins to nothing, it stops reflecting and still transmits all of the power.
  2. 02

    Scene 2: Single-layer antireflection

    Select antireflection and probe 550 nm. Then change the wavelength or the angle without retuning the layer, and watch the cancellation break.

    What to observe: Perfect anti-reflection at the design wavelength does not have to make the reflected daylight exactly black.
  3. 03

    Scene 3: Five-pair dielectric mirror

    Select the multilayer scene. Edit both thicknesses, both indices, repeat count and substrate. Then compare s and p at oblique incidence.

    What to observe: A dielectric mirror reflects within a band; it is not a perfect reflector at every wavelength. Its angle map shows how the reflection depends on wavelength and polarization.

Related experiments and articles

Continue exploring

One film, many colours

Separate a changing thickness pattern from the spectrum reflected by one local layer.

  1. LabLiving Rainbow · Thin-Film InterferenceExplore a curved film with changing thickness.
  2. You are hereThin-Film Color StudioMeasure spectra and polarization in planar single and multilayer films.

Probes and measurement · Reading path

Interference for measuring length and recording images

Articles on this path that use this experiment, followed by the other experiments they suggest.

  1. ArticleLippmann: colour stored through the depth of a plate
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy