ct.colormap¶
Functions for querying matplotlib’s colormaps.
- ct.colormap.query(values, colormap='viridis')[source]¶
Query matplotlib’s color map.
- Parameters:
values (Float[ndarray, '*batch']) – Scalar values to map to colors. Valid range is [0, 1].
colormap (str) – Name of matplotlib color map.
- Returns:
RGB colors corresponding to input values.
- Raises:
ValueError – If values.dtype is not float32 or float64.
- Return type:
Float[ndarray, ‘*batch 3’]