ColorMap.from_two_colors

classmethod ColorMap.from_two_colors(c1, c2, diverging=False)

Create a color map from two colors.

Parameters
  • c1 (Color) – The first color.

  • c2 (Color) – The second color.

  • diverging (bool, optional) – If True, use white as transition color in the middle.

Returns

ColorMap