• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python colors.rgb_to_hsl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pygal.colors.rgb_to_hsl函数的典型用法代码示例。如果您正苦于以下问题:Python rgb_to_hsl函数的具体用法?Python rgb_to_hsl怎么用?Python rgb_to_hsl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了rgb_to_hsl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_rgb_to_hsl_part_6

def test_rgb_to_hsl_part_6():
    assert rgb_to_hsl(0, 0, 255) == (240, 100, 50)
    assert rgb_to_hsl(51, 0, 255) == (252, 100, 50)
    assert rgb_to_hsl(102, 0, 255) == (264, 100, 50)
    assert rgb_to_hsl(153, 0, 255) == (276, 100, 50)
    assert rgb_to_hsl(204, 0, 255) == (288, 100, 50)
    assert rgb_to_hsl(255, 0, 255) == (300, 100, 50)
    assert rgb_to_hsl(255, 0, 204) == (312, 100, 50)
    assert rgb_to_hsl(255, 0, 153) == (324, 100, 50)
    assert rgb_to_hsl(255, 0, 102) == (336, 100, 50)
    assert rgb_to_hsl(255, 0, 51) == (348, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:11,代码来源:test_colors.py


示例2: test_rgb_to_hsl_part_6

def test_rgb_to_hsl_part_6():
    """Test rgb to hsl color function"""
    assert rgb_to_hsl(0, 0, 255) == (240, 100, 50)
    assert rgb_to_hsl(51, 0, 255) == (252, 100, 50)
    assert rgb_to_hsl(102, 0, 255) == (264, 100, 50)
    assert rgb_to_hsl(153, 0, 255) == (276, 100, 50)
    assert rgb_to_hsl(204, 0, 255) == (288, 100, 50)
    assert rgb_to_hsl(255, 0, 255) == (300, 100, 50)
    assert rgb_to_hsl(255, 0, 204) == (312, 100, 50)
    assert rgb_to_hsl(255, 0, 153) == (324, 100, 50)
    assert rgb_to_hsl(255, 0, 102) == (336, 100, 50)
    assert rgb_to_hsl(255, 0, 51) == (348, 100, 50)
开发者ID:aroraumang,项目名称:pygal,代码行数:12,代码来源:test_colors.py


示例3: test_rgb_to_hsl_part_18

def test_rgb_to_hsl_part_18():
    # assert rgb_to_hsl(0, 0, 0) == (300, 100, 0)
    assert rgb_to_hsl(51, 0, 51) == (300, 100, 10)
    assert rgb_to_hsl(102, 0, 102) == (300, 100, 20)
    assert rgb_to_hsl(153, 0, 153) == (300, 100, 30)
    assert rgb_to_hsl(204, 0, 204) == (300, 100, 40)
    assert rgb_to_hsl(255, 0, 255) == (300, 100, 50)
    assert rgb_to_hsl(255, 51, 255) == (300, 100, 60)
    assert rgb_to_hsl(255, 102, 255) == (300, 100, 70)
    assert rgb_to_hsl(255, 153, 255) == (300, 100, 80)
    assert rgb_to_hsl(255, 204, 255) == (300, 100, 90)
开发者ID:AlexSnet,项目名称:pygal,代码行数:11,代码来源:test_colors.py


示例4: test_rgb_to_hsl_part_18

def test_rgb_to_hsl_part_18():
    """Test rgb to hsl color function"""
    # assert rgb_to_hsl(0, 0, 0) == (300, 100, 0)
    assert rgb_to_hsl(51, 0, 51) == (300, 100, 10)
    assert rgb_to_hsl(102, 0, 102) == (300, 100, 20)
    assert rgb_to_hsl(153, 0, 153) == (300, 100, 30)
    assert rgb_to_hsl(204, 0, 204) == (300, 100, 40)
    assert rgb_to_hsl(255, 0, 255) == (300, 100, 50)
    assert rgb_to_hsl(255, 51, 255) == (300, 100, 60)
    assert rgb_to_hsl(255, 102, 255) == (300, 100, 70)
    assert rgb_to_hsl(255, 153, 255) == (300, 100, 80)
    assert rgb_to_hsl(255, 204, 255) == (300, 100, 90)
开发者ID:aroraumang,项目名称:pygal,代码行数:12,代码来源:test_colors.py


示例5: test_rgb_to_hsl_part_0

def test_rgb_to_hsl_part_0():
    assert rgb_to_hsl(255, 0, 0) == (0, 100, 50)
    assert rgb_to_hsl(255, 255, 0) == (60, 100, 50)
    assert rgb_to_hsl(0, 255, 0) == (120, 100, 50)
    assert rgb_to_hsl(0, 255, 255) == (180, 100, 50)
    assert rgb_to_hsl(0, 0, 255) == (240, 100, 50)
    assert rgb_to_hsl(255, 0, 255) == (300, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:7,代码来源:test_colors.py


示例6: test_rgb_to_hsl_part_0

def test_rgb_to_hsl_part_0():
    """Test rgb to hsl color function"""
    assert rgb_to_hsl(255, 0, 0) == (0, 100, 50)
    assert rgb_to_hsl(255, 255, 0) == (60, 100, 50)
    assert rgb_to_hsl(0, 255, 0) == (120, 100, 50)
    assert rgb_to_hsl(0, 255, 255) == (180, 100, 50)
    assert rgb_to_hsl(0, 0, 255) == (240, 100, 50)
    assert rgb_to_hsl(255, 0, 255) == (300, 100, 50)
开发者ID:aroraumang,项目名称:pygal,代码行数:8,代码来源:test_colors.py


示例7: test_rgb_to_hsl_part_4

def test_rgb_to_hsl_part_4():
    assert rgb_to_hsl(255, 0, 0) == (0, 100, 50)
    assert rgb_to_hsl(255, 51, 0) == (12, 100, 50)
    assert rgb_to_hsl(255, 102, 0) == (24, 100, 50)
    assert rgb_to_hsl(255, 153, 0) == (36, 100, 50)
    assert rgb_to_hsl(255, 204, 0) == (48, 100, 50)
    assert rgb_to_hsl(255, 255, 0) == (60, 100, 50)
    assert rgb_to_hsl(204, 255, 0) == (72, 100, 50)
    assert rgb_to_hsl(153, 255, 0) == (84, 100, 50)
    assert rgb_to_hsl(102, 255, 0) == (96, 100, 50)
    assert rgb_to_hsl(51, 255, 0) == (108, 100, 50)
    assert rgb_to_hsl(0, 255, 0) == (120, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:12,代码来源:test_colors.py


示例8: test_rgb_to_hsl_part_12

def test_rgb_to_hsl_part_12():
    """Test rgb to hsl color function"""
    assert rgb_to_hsl(153, 102, 153) == (300, 20, 50)
    assert rgb_to_hsl(204, 51, 204) == (300, 60, 50)
    assert rgb_to_hsl(255, 0, 255) == (300, 100, 50)
开发者ID:aroraumang,项目名称:pygal,代码行数:5,代码来源:test_colors.py


示例9: test_rgb_to_hsl_part_11

def test_rgb_to_hsl_part_11():
    """Test rgb to hsl color function"""
    assert rgb_to_hsl(102, 102, 153) == (240, 20, 50)
    assert rgb_to_hsl(51, 51, 204) == (240, 60, 50)
    assert rgb_to_hsl(0, 0, 255) == (240, 100, 50)
开发者ID:aroraumang,项目名称:pygal,代码行数:5,代码来源:test_colors.py


示例10: test_rgb_to_hsl_part_9

def test_rgb_to_hsl_part_9():
    """Test rgb to hsl color function"""
    assert rgb_to_hsl(102, 153, 102) == (120, 20, 50)
    assert rgb_to_hsl(51, 204, 51) == (120, 60, 50)
    assert rgb_to_hsl(0, 255, 0) == (120, 100, 50)
开发者ID:aroraumang,项目名称:pygal,代码行数:5,代码来源:test_colors.py


示例11: test_rgb_to_hsl_part_8

def test_rgb_to_hsl_part_8():
    """Test rgb to hsl color function"""
    assert rgb_to_hsl(153, 153, 102) == (60, 20, 50)
    assert rgb_to_hsl(204, 204, 51) == (60, 60, 50)
    assert rgb_to_hsl(255, 255, 0) == (60, 100, 50)
开发者ID:aroraumang,项目名称:pygal,代码行数:5,代码来源:test_colors.py


示例12: test_rgb_to_hsl_part_7

def test_rgb_to_hsl_part_7():
    assert rgb_to_hsl(153, 102, 102) == (0, 20, 50)
    assert rgb_to_hsl(204, 51, 51) == (0, 60, 50)
    assert rgb_to_hsl(255, 0, 0) == (0, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:4,代码来源:test_colors.py


示例13: test_rgb_to_hsl_part_5

def test_rgb_to_hsl_part_5():
    """Test rgb to hsl color function"""
    assert rgb_to_hsl(0, 255, 0) == (120, 100, 50)
    assert rgb_to_hsl(0, 255, 51) == (132, 100, 50)
    assert rgb_to_hsl(0, 255, 102) == (144, 100, 50)
    assert rgb_to_hsl(0, 255, 153) == (156, 100, 50)
    assert rgb_to_hsl(0, 255, 204) == (168, 100, 50)
    assert rgb_to_hsl(0, 255, 255) == (180, 100, 50)
    assert rgb_to_hsl(0, 204, 255) == (192, 100, 50)
    assert rgb_to_hsl(0, 153, 255) == (204, 100, 50)
    assert rgb_to_hsl(0, 102, 255) == (216, 100, 50)
    assert rgb_to_hsl(0, 51, 255) == (228, 100, 50)
    assert rgb_to_hsl(0, 0, 255) == (240, 100, 50)
开发者ID:aroraumang,项目名称:pygal,代码行数:13,代码来源:test_colors.py


示例14: test_rgb_to_hsl_part_4

def test_rgb_to_hsl_part_4():
    """Test rgb to hsl color function"""
    assert rgb_to_hsl(255, 0, 0) == (0, 100, 50)
    assert rgb_to_hsl(255, 51, 0) == (12, 100, 50)
    assert rgb_to_hsl(255, 102, 0) == (24, 100, 50)
    assert rgb_to_hsl(255, 153, 0) == (36, 100, 50)
    assert rgb_to_hsl(255, 204, 0) == (48, 100, 50)
    assert rgb_to_hsl(255, 255, 0) == (60, 100, 50)
    assert rgb_to_hsl(204, 255, 0) == (72, 100, 50)
    assert rgb_to_hsl(153, 255, 0) == (84, 100, 50)
    assert rgb_to_hsl(102, 255, 0) == (96, 100, 50)
    assert rgb_to_hsl(51, 255, 0) == (108, 100, 50)
    assert rgb_to_hsl(0, 255, 0) == (120, 100, 50)
开发者ID:aroraumang,项目名称:pygal,代码行数:13,代码来源:test_colors.py


示例15: test_rgb_to_hsl_part_5

def test_rgb_to_hsl_part_5():
    assert rgb_to_hsl(0, 255, 0) == (120, 100, 50)
    assert rgb_to_hsl(0, 255, 51) == (132, 100, 50)
    assert rgb_to_hsl(0, 255, 102) == (144, 100, 50)
    assert rgb_to_hsl(0, 255, 153) == (156, 100, 50)
    assert rgb_to_hsl(0, 255, 204) == (168, 100, 50)
    assert rgb_to_hsl(0, 255, 255) == (180, 100, 50)
    assert rgb_to_hsl(0, 204, 255) == (192, 100, 50)
    assert rgb_to_hsl(0, 153, 255) == (204, 100, 50)
    assert rgb_to_hsl(0, 102, 255) == (216, 100, 50)
    assert rgb_to_hsl(0, 51, 255) == (228, 100, 50)
    assert rgb_to_hsl(0, 0, 255) == (240, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:12,代码来源:test_colors.py


示例16: test_rgb_to_hsl_part_8

def test_rgb_to_hsl_part_8():
    assert rgb_to_hsl(153, 153, 102) == (60, 20, 50)
    assert rgb_to_hsl(204, 204, 51) == (60, 60, 50)
    assert rgb_to_hsl(255, 255, 0) == (60, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:4,代码来源:test_colors.py


示例17: test_rgb_to_hsl_part_12

def test_rgb_to_hsl_part_12():
    assert rgb_to_hsl(153, 102, 153) == (300, 20, 50)
    assert rgb_to_hsl(204, 51, 204) == (300, 60, 50)
    assert rgb_to_hsl(255, 0, 255) == (300, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:4,代码来源:test_colors.py


示例18: test_rgb_to_hsl_part_11

def test_rgb_to_hsl_part_11():
    assert rgb_to_hsl(102, 102, 153) == (240, 20, 50)
    assert rgb_to_hsl(51, 51, 204) == (240, 60, 50)
    assert rgb_to_hsl(0, 0, 255) == (240, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:4,代码来源:test_colors.py


示例19: test_rgb_to_hsl_part_10

def test_rgb_to_hsl_part_10():
    assert rgb_to_hsl(102, 153, 153) == (180, 20, 50)
    assert rgb_to_hsl(51, 204, 204) == (180, 60, 50)
    assert rgb_to_hsl(0, 255, 255) == (180, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:4,代码来源:test_colors.py


示例20: test_rgb_to_hsl_part_9

def test_rgb_to_hsl_part_9():
    assert rgb_to_hsl(102, 153, 102) == (120, 20, 50)
    assert rgb_to_hsl(51, 204, 51) == (120, 60, 50)
    assert rgb_to_hsl(0, 255, 0) == (120, 100, 50)
开发者ID:AlexSnet,项目名称:pygal,代码行数:4,代码来源:test_colors.py



注:本文中的pygal.colors.rgb_to_hsl函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python styles.values函数代码示例发布时间:2022-05-25
下一篇:
Python colors.hsl_to_rgb函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap