ColorMap.from_two_colors

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

Create a color map from two colors.

Parameters:
c1compas.colors.Color

The first color.

c2compas.colors.Color

The second color.

divergingbool, optional

If True, use white as transition color in the middle.

Returns:
compas.colors.ColorMap

A color map with 256 colors.