cityImage.random_colors_list#
- cityImage.random_colors_list(nlabels, vmin=0.8, vmax=1.0, hsv=False)[source]#
Generates a list of random HSV colors given the number of classes, minimum and maximum values in the HSV spectrum.
- Parameters:
nlabels (int) – The number of classes or labels for which colors are generated.
vmin (float) – The minimum value in the HSV spectrum. Default is 0.8.
vmax (float) – The maximum value in the HSV spectrum. Default is 1.0.
hsv (bool) – Indicates whether to return colors in HSV format (True) or convert them to RGB format (False). Default is False.
- Returns:
colors – A list of random HSV colors or RGB colors, depending on the value of hsv.
- Return type:
list