colour.msds_constant¶
- colour.msds_constant(k, labels, shape=SpectralShape(360, 780, 1), dtype=None)[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.
dtype (type) – Data type used for the multi-spectral distributions.
- Returns
Constant \(k\) filled multi-spectral distributions.
- Return type
Notes
By default, the multi-spectral distributions will use the shape given by
colour.SPECTRAL_SHAPE_DEFAULT
attribute.
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']