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
, optional) – The colormap name. This can also be passed as the first positional string argument. Default is'_no_name'
.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. Default is'hsl'
.l, s, a, c – Shorthands for
luminance
,saturation
,alpha
, andchroma
.luminance (
float
orcolor-spec
, optional) – If float, this is the luminance channel strength on the left-hand side of the colormap (default is100
). If RGB[A] tuple, hex string, or named color string, the luminance is inferred from the color.saturation, alpha (
float
orcolor-spec
, optional) – As withluminance
, except the defaultsaturation
and the defaultalpha
are the channel values taken fromcolor
.chroma – Alias for
saturation
.
- Other Parameters
**kwargs – Passed to
PerceptualColormap.from_hsl
.- Returns
PerceptualColormap
– The colormap.