7.3. cpforager.misc.random_colors

cpforager.misc.random_colors(n_cols=1)

Produce a list of random colors.

Parameters:

n_cols (int) – number of random colors desired.

Returns:

the list of n_cols random colors.

Return type:

list[list[float]]

The list is composed of n_cols random colors defined by 3 RGB numbers between 0 and 1. The size of the list is (n_cols,3).