tools.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:complex 作者: ttrouill 项目源码 文件源码
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']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号