net_distribution.py 文件源码

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

项目:tweetopo 作者: zthxxx 项目源码 文件源码
def hue_map(self, value):
        '''
        :param value: number 0 to 1, map to hue 0.6 - 0 (blue to red, like heatmap)
                      more highter the value, more warm the color
        :return: hex of rgb
        '''
        HUE_MAX = 0.6
        hue = pow(1 - value, 2) * HUE_MAX
        rgb = colors.hsv_to_rgb((hue, 1, 1))
        hex = colors.to_hex(rgb)
        return hex
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号