colour.msds_constant

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

Returns the multi-spectral distributions with given labels and given spectral shape filled with constant \(k\) values.

Parameters
  • k (numeric) – Constant \(k\) to fill the multi-spectral distributions with.

  • labels (array_like) – Names to use for the colour.SpectralDistribution class instances.

  • shape (SpectralShape, optional) – Spectral shape used to create the multi-spectral distributions.

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

Returns

Constant \(k\) filled multi-spectral distributions.

Return type

MultiSpectralDistributions

Notes

Examples

>>> msds = msds_constant(100, labels=['a', 'b', 'c'])
>>> msds.shape
SpectralShape(360.0, 780.0, 1.0)
>>> msds[400]
array([ 100.,  100.,  100.])
>>> msds.labels  
['a', 'b', 'c']