PerceptuallyUniformColormap.from_color¶
- classmethod PerceptuallyUniformColormap.from_color(name, color, *, space='hsl', **kwargs)[source]¶
Return a simple monochromatic “sequential” colormap that blends from white or near-white to the input color.
- Parameters
name (str, optional) – The colormap name.
color (color-spec) – RGB tuple, hex string, or named color string.
l, s, a, c – Shorthands for
luminance,saturation,alpha, andchroma.luminance (float or channel-spec, optional) – If float, this is the luminance channel strength on the left-hand side of the colormap (default is
100). If RGB[A] tuple, hex string, or named color string, the luminance is inferred from the color.saturation, alpha (float or channel-spec, optional) – As with
luminance, except the defaultsaturationand the defaultalphaare the channel values taken fromcolor.chroma – Alias for
saturation.space ({‘hsl’, ‘hpl’, ‘hcl’}, optional) – The colorspace in which luminance and/or saturation are varied.
- Other Parameters
**kwargs – Passed to
PerceptuallyUniformColormap.from_hsl.- Returns
PerceptuallyUniformColormap– The colormap.