colour.plotting.plot_thin_film_iridescence#
- colour.plotting.plot_thin_film_iridescence(n: ArrayLike, t: ArrayLike | None = None, theta: ArrayLike = 0, shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, illuminant: SpectralDistribution | str = 'D65', **kwargs: Any) Tuple[Figure, Axes][source]#
Plot thin film iridescence colours.
Creates a colour strip showing how thin film interference produces iridescent colours, similar to soap films, oil slicks, or soap bubbles.
- Parameters:
n (ArrayLike) – Complete refractive index stack \(n_j\) for single-layer film. Shape: (3,) or (3, wavelengths_count). The array should contain [n_incident, n_film, n_substrate]. Supports wavelength-dependent refractive index for dispersion.
t (ArrayLike | None) – Array of thicknesses \(t\) in nanometers. If None, uses 0-1000 nm.
theta (ArrayLike) – Incident angle \(\theta\) in degrees. Default is 0 (normal incidence).
shape (SpectralShape) – Spectral shape for wavelength sampling.
illuminant (SpectralDistribution | str) – Illuminant used for color calculation. Can be either a string (e.g., “D65”) or a
colour.SpectralDistributionclass instance.kwargs (Any) – {
colour.plotting.artist(),colour.plotting.render()}, See the documentation of the previously listed definitions.
- Returns:
Current figure and axes.
- Return type:
Examples
>>> plot_thin_film_iridescence([1.0, 1.33, 1.0]) (<Figure size ... with 1 Axes>, <...Axes...>)