metamerism explorer
Analyze, generate and push to the extreme metameric reflectances under different illuminants, observers and cameras.
Two physically different spectra can produce the same color under one viewing condition and different colors under another. Choose a reference condition (where spectra must match) and a test condition (where they may not), then analyze existing spectra, generate metamers, or search for the most extreme one. Everything runs in your browser.
Metamer mismatch body
CIELAB under the test condition, with equal scales on both axes. Each point is a boundary metamer, drawn in its own color; click one to show the reflectance responsible for it. Points inside an outline are on the body’s surface above or below the plotted plane.
Spectral reflectance
Difference from the reference
Colors
How it works
Spectra are sampled from 380 to 780 nm. A viewing condition is an illuminant plus spectral sensitivities, and acts as a linear map from a reflectance r to tristimulus values: XYZ = M r, with M = k · S(λ) · x̄ȳz̄(λ) · Δλ (trapezoidal weights) and k such that a perfect white has Y = 1. CIELAB is computed relative to the condition’s own white. For a camera, M maps reflectance to white-balanced camera RGB and then to XYZ (D65) through a 3 × 3 color correction matrix fitted under the same illuminant on the 24 ColorChecker reflectances, so ΔE00 is defined for cameras too.
Two reflectances are metamers under a condition when M r₁ = M r₂, so their difference r₂ − r₁ (a metameric black) lies in the null space of M. Random metamers add a random metameric black b = (I − M⁺M) v; smooth ones use v and b in the span of cubic B-splines. The step r₂ = r₁ + α b is scaled so that every value stays between 0 and 1 (“strength” is the fraction of the largest such step): values are never clipped, because clipping would break the match. The color-locked editor moves the spectrum toward the dragged point and then returns the closest spectrum that keeps the reference color, stays within 0–1 and passes through the point (alternating projections, Dykstra’s algorithm). A target color is turned into the reflectance closest to a flat grey that produces it, if any does.
The extreme search looks for a reflectance with the reference color under the reference condition that changes color as much as possible under the test condition. ΔE00 is nonlinear, so the search solves linear programs that push the test color as far as possible along many directions in CIELAB (exact simplex solutions, either for any 0–1 reflectance or for smooth B-spline reflectances), and keeps the one with the largest exact ΔE00, refining around the best direction. It finds a strong maximum but cannot guarantee the global one. Unrestricted extremes are typically block-shaped (0 or 1 almost everywhere); smooth ones are more realistic.
The metamer mismatch body is the set of colors, under the test condition, of all reflectances that have the reference color under the reference condition: { Mtest r : Mref r = Mref r₁, 0 ≤ r ≤ 1 }. It is a convex polytope in XYZ. Its boundary is sampled with one linear program per direction (maximizing the projection of the test color on that direction, for directions spread evenly in CIELAB); each optimum is a boundary point, and its reflectance is kept so it can be shown. The plots project the boundary points to two CIELAB axes and outline them with their convex hull; the body is convex in XYZ but not necessarily in CIELAB, so the outline is an approximation that improves with more directions. Volumes are those of the convex hull of the boundary points, in XYZ (exactly convex) and in CIELAB (ΔE³ units, approximate). Smooth bodies are restricted to B-spline reflectances, so they are smaller and closer to what real materials can do. A body collapses to a point when both conditions are identical, and becomes flat when the reference color lies on the edge of the possible object colors (e.g. a perfect white).
The color difference under the test condition is reported as ΔE00 between the two colors; it is not the standardized metamerism index of ISO 18314-4, which additionally corrects for any mismatch under the reference condition. Built-in spectra: ISO 17321-1 ColorChecker reflectances (380–780 nm), X-Rite ColorChecker Digital SG reference reflectances (Spectrolino, 2005; 380–730 nm, extended at constant value to 780 nm), and simple synthetic spectra.