colour.sd_constant

colour.sd_constant(k, shape=SpectralShape(360, 780, 1), **kwargs)[source]

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

Parameters
  • k (numeric) – Constant \(k\) to fill the spectral distribution with.

  • shape (SpectralShape, optional) – Spectral shape used to create the spectral distribution.

  • **kwargs (dict, optional) – {colour.SpectralDistribution}, Please refer to the documentation of the previously listed class.

Returns

Constant \(k\) filled spectral distribution.

Return type

SpectralDistribution

Notes

Examples

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