color.py 文件源码

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

项目:deb-python-lesscpy 作者: openstack 项目源码 文件源码
def _ophsl(self, color, diff, idx, operation):
        if isinstance(diff, str):
            diff = float(diff.strip('%'))
        hls = list(self._hextohls(color))
        hls[idx] = self._clamp(operation(hls[idx], diff / 100.0))
        rgb = colorsys.hls_to_rgb(*hls)
        color = (utility.away_from_zero_round(c * 255) for c in rgb)
        return self._rgbatohex(color)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号