PerceptuallyUniformColormap.from_color

static 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 tuple, hex string, or named color string, the luminance and saturation (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.