ColorMap.from_color

classmethod ColorMap.from_color(color, rangetype='full')

Construct a color map from a single color by varying luminance.

Parameters
  • color (Color) – The base color.

  • rangetype (Literal[‘full’, ‘light’, ‘dark’], optional) – If 'full', use the full luminance range (0.0 - 1.0). If 'light', use only the “light” part of the luminance range (0.5 - 1.0). If 'dark', use only the “dark” part of the luminance range (0.0 - 0.5).

Returns

Color