random_colors¶
- random_colors(num_colors, *, bright)[source]¶
Generate a number of random colors.
To get visually distinct colors, generate them in HSV space then convert to RGB.
- Parameters:
- Returns:
Array of (r, g, b) colors.
- Return type:
np.ndarray
Examples
>>> from tiatoolbox.utils.visualization import random_colors >>> colors = random_colors(10, bright=True)