deepdisc.astrodet.colormap

An awesome colormap for really neat visualizations. Copied from Detectron, and removed gray colors.

Functions

colormap([rgb, maximum])

random_color([rgb, maximum])

random_colors(N[, rgb, maximum])

Module Contents

colormap(rgb=False, maximum=255)[source]
Parameters:
  • rgb (bool) – whether to return RGB colors or BGR colors.

  • maximum (int) – either 255 or 1

Returns:

a float32 array of Nx3 colors, in range [0, 255] or [0, 1]

Return type:

ndarray

random_color(rgb=False, maximum=255)[source]
Parameters:
  • rgb (bool) – whether to return RGB colors or BGR colors.

  • maximum (int) – either 255 or 1

Returns:

a vector of 3 numbers

Return type:

ndarray

random_colors(N, rgb=False, maximum=255)[source]
Parameters:
  • N (int) – number of unique colors needed

  • rgb (bool) – whether to return RGB colors or BGR colors.

  • maximum (int) – either 255 or 1

Returns:

a list of random_color

Return type:

ndarray