Expand description
P7.3 — σ spectral blend as interpolation on the spectral manifold. P7.3 — σ spectral blend as interpolation on the spectral manifold.
Blending colours in spectral space (interpolating SPDs) is physically correct: it preserves the spectral power distribution’s structure, unlike RGB lerp which can produce intermediate colours that don’t correspond to any physical spectrum.
§Algorithm
Spectral blend: S_blend(t) = (1-t)·S_a + t·S_b in SPD space, then
project to XYZ/RGB.
RGB lerp: RGB_blend(t) = (1-t)·RGB_a + t·RGB_b in sRGB space.
The divergence between the two is the ΔE of their XYZ projections.
§Determinism
All operations are deterministic: SPD lerp is a pure function, and the CMF projection is a compile-time constant.
Functions§
- blend_
divergence - Compute the ΔE divergence between spectral blend and gamma-encoded
sRGB lerp at parameter
t. - rgb_
lerp - RGB lerp in linear sRGB space (for comparison with spectral blend).
- spectral_
blend_ emf - Blend two EMF payloads in spectral space and return the resulting XYZ.
- spectral_
blend_ spd - Blend two SPDs in spectral space:
S(t) = (1-t)·a + t·b.