rstoolbox.utils.add_white_to_cmap

rstoolbox.utils.add_white_to_cmap(color=None, cmap=None, n_colors=10)

Generate a new colormap with white as first instance.

Parameters:
  • color (Union[str, int]) – Color identifier.
  • cmap (Union[str, Colormap]) – Cmap identifier. Incompatible with color.
  • n_colors (int) – Number discret colors to generate from.
Returns:

Colormap

Raises:
AttributeError:If both color and cmap are specified or if none of them are.