ColorMap.from_color
- classmethod ColorMap.from_color(color, rangetype='full')[source]
Construct a color map from a single color by varying luminance.
- Parameters:
- color
compas.colors.Color The base color.
- rangetypeLiteral[‘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).
- color
- Returns:
compas.colors.ColorA color map with 256 colors.