PerceptuallyUniformColormap.from_color

classmethod PerceptuallyUniformColormap.from_color(name, color, fade=None, space='hsl', **kwargs)[source]

Return a 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.

  • fade (float or color-spec, optional) – If float, this is the luminance channel strength on the left-hand side of the colormap (default is 100), and the saturation channel is held constant throughout the colormap.

    If RGB[A] tuple, hex string, or named color string, the luminance, saturation, and opacity (but not the hue) from this color are used for the left-hand side of the colormap.

  • space ({‘hsl’, ‘hpl’, ‘hcl’}, optional) – The colorspace in which the luminance is varied.

Other Parameters

**kwargs – Passed to PerceptuallyUniformColormap.from_hsl.

Returns

PerceptuallyUniformColormap – The colormap.