PerceptualColormap.from_color¶
- classmethod PerceptualColormap.from_color(*args, **kwargs)[source]¶
Return a simple monochromatic “sequential” colormap that blends from white or near-white to the input color.
- Parameters
color (
color-spec) – RGB tuple, hex string, or named color string.name (
str, default:'_no_name') – The colormap name. This can also be passed as the first positional string argument.space (
{'hsl', 'hpl', 'hcl', 'hsv'}, optional) – The hue, saturation, luminance-style colorspace to use for interpreting the channels. See this page for a full description.l, s, a, c – Shorthands for
luminance,saturation,alpha, andchroma.luminance (
floatorcolor-spec, default:100) – If float, this is the luminance channel strength on the left-hand side of the colormap. If RGB[A] tuple, hex string, or named color string, the luminance is inferred from the color.saturation, alpha (
floatorcolor-spec, optional) – As withluminance, except the defaultsaturationand the defaultalphaare the channel values taken fromcolor.chroma – Alias for
saturation.
- Other Parameters
**kwargs – Passed to
PerceptualColormap.from_hsl.- Returns
PerceptualColormap– The colormap.