---
title: "Thin-Film Color Studio Interactive Lab | Sandbox Physics"
description: "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."
canonical_url: "https://sandboxphysics.com/labs/thin-film-color-studio/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/thin-film-color-studio/"
last_modified: "2026-10-27"
---

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 simulation: open this page in a web browser to change the parameters and run the model.

The layers are infinite, flat and lossless, with real, nondispersive indices on a semi-infinite substrate. The Lab does not model a curved bubble or fluid flow, does not optimize arbitrary stacks and does not produce calibrated photographs.

Physics tutorial

## Audit the physics of Thin-Film Color Studio

**Background** A 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 $\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 matters** Why 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(\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

$$
n_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

$$
M_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

$$
\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

$$
n_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)=\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 misconception** Any iridescent material shader correctly simulates soap bubbles and every optical coating.

**Better mental model** Colours 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.

Physical conclusion

One physical layer stack and one coherent boundary solution give the power at both exits, and a specified colour calculation turns the spectra into colour.

## Related experiments and articles

Continue exploring

### One film, many colours

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

1. [Lab **Living Rainbow · Thin-Film Interference** Explore a curved film with changing thickness.](https://sandboxphysics.com/labs/thin-film-interference/)
2. [You are here **Thin-Film Color Studio** Measure spectra and polarization in planar single and multilayer films.](https://sandboxphysics.com/labs/thin-film-color-studio/)

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. [Article **Lippmann: colour stored through the depth of a plate**](https://sandboxphysics.com/stories/probe-evidence/lippmann-recorded-colour/)

Waves & optics · Starter path

## From one ray to interference measurement

Start with refraction, find where the ray picture stops working, then use interference to measure tiny distances.

[Start here → **Optical Boundary Explorer** Turn the incident angle and watch reflected and transmitted power trade off. Then switch to the critical-angle scene. Observe · 11 min](https://sandboxphysics.com/labs/optical-boundary-explorer/)

1. [1 Optical Boundary Explorer](https://sandboxphysics.com/labs/optical-boundary-explorer/)
2. [2 Rainbow Caustic Observatory](https://sandboxphysics.com/labs/rainbow-laboratory/)
3. [3 Camera Obscura](https://sandboxphysics.com/labs/camera-obscura/)
4. [4 Coherent Wave Composer](https://sandboxphysics.com/labs/coherent-wave-composer/)
5. [5 Young Double-Slit Bench](https://sandboxphysics.com/labs/young-double-slit-bench/)
6. [6 Michelson Precision Lab](https://sandboxphysics.com/labs/michelson-precision-lab/)

[View the full path →](https://sandboxphysics.com/topics/waves-and-optics/#starter-path)
