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, and chroma.

  • luminance (float or color-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 (float or color-spec, optional) – As with luminance, except the default saturation and the default alpha are the channel values taken from color.

  • chroma – Alias for saturation.

Other Parameters

**kwargs – Passed to PerceptualColormap.from_hsl.

Returns

PerceptualColormap – The colormap.