colour.sd_constant

colour.sd_constant(k: float, shape: colour.colorimetry.spectrum.SpectralShape = SPECTRAL_SHAPE_DEFAULT, **kwargs: Any) colour.colorimetry.spectrum.SpectralDistribution[source]

Return a spectral distribution of given spectral shape filled with constant \(k\) values.

Parameters
Returns

Constant \(k\) filled spectral distribution.

Return type

colour.SpectralDistribution

Notes

Examples

>>> sd = sd_constant(100)
>>> sd.shape
SpectralShape(360.0, 780.0, 1.0)
>>> sd[400]
100.0