def _get_colors(num_colors):
colors=[]
for i in np.arange(0., 360., 360. / num_colors):
hue = i/360.
lightness = (50 + np.random.rand() * 10)/100.
saturation = (90 + np.random.rand() * 10)/100.
colors.append(colorsys.hls_to_rgb(hue, lightness, saturation))
return colors
#colors = ['g','c','r','b','m','k','y',"orange",'indigo','salmon','crimson','hotpink','saddlebrown','lightgreen','yellowgreen','peru','gray','darkred']
评论列表
文章目录