pipewidgets.py 文件源码

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

项目:berrl 作者: murphy214 项目源码 文件源码
def make_legend(title,colors,labels):
    colorhashs=[]
    for row in colors:
        colorhashs.append(get_colors(row))
    return '''
<div id='legend' style='display:none;'>
  <strong>%s</strong>
  <nav class='legend clearfix'>
    <span style='background:%s;'></span>
    <span style='background:%s;'></span>
    <span style='background:%s;'></span>
    <span style='background:%s;'></span>
    <span style='background:%s;'></span>
    <label>%s</label>
    <label>%s</label>
    <label>%s</label>
    <label>%s</label>
    <label>%s</label>
    <small>Source: <a href="https://github.com/murphy214/berrl">Made using Berrl</a></small>
</div>
''' % (title,colorhashs[0],colorhashs[1],colorhashs[2],colorhashs[3],colorhashs[4],labels[0],labels[1],labels[2],labels[3],labels[4])


# returns the blocks of color backgrounds for a given list of colors
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号