scheme_primitives.py 文件源码

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

项目:Scheme 作者: StephenK1998 项目源码 文件源码
def tscheme_rgb(red, green, blue):
    """Return a color from red, green, and blue values from 0 to 1."""
    colors = (red, green, blue)
    for x in colors:
        if x < 0 or x > 1:
            raise SchemeError("Illegal color intensity in " + str(colors))
    scaled = tuple(int(x*255) for x in colors)
    return '"#%02x%02x%02x"' % scaled
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号