rgb_and_colorbar#
- colorsynth.rgb_and_colorbar(spd, wavelength, axis=-1, spd_min=None, spd_max=None, spd_norm=None, wavelength_min=None, wavelength_max=None, wavelength_norm=None, **kwargs_colorbar)[source]#
Convenience function that calls
rgb()andcolorbar()and returns the results as a tuple.- Parameters:
spd (ndarray) – a spectral power distribution to be converted into a RGB array
wavelength (Quantity) – the wavelength array corresponding to the spectral power distribution
axis (int) – the logical axis corresponding to changing wavelength, or the axis along which to integrate the spectral power distribution
spd_min (None | ndarray) – the value of the spectral power distribution representing minimum intensity.
spd_max (None | ndarray) – the value of the spectral power distribution representing minimum intensity.
spd_norm (None | Callable[[ndarray], ndarray]) – an optional function to transform the spectral power distribution values before mapping to RGB
wavelength_min (None | Quantity) – the wavelength value that is mapped to the minimum wavelength of the human visible color range, 380 nm.
wavelength_max (None | Quantity) – the wavelength value that is mapped to the maximum wavelength of the human visible color range, 700 nm
wavelength_norm (None | Callable[[Quantity], Quantity]) – an optional function to transform the wavelength values before they are mapped into the human visible color range.
kwargs_colorbar – Any additional keyword arguments needed by
colorbar().
- Return type: